Bracket on the side of a fraction only over the numerator or denominator

Use mathtools and its \mathrlap macro

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
  \frac{1}{a + b \mathrlap{\ \} = 1} } 
\]
\end{document}

BTW: Next time please post a full minimal example like above. That makes it s lot easier for others to test your code and not get stumped by some missing package you did not mention.

enter image description here


A solution with stacks. Here, the equation axis remains aligned with the = sign, which may be important in some use cases.

\documentclass{article}
\usepackage{stackengine,amsmath}
\stackMath
\begin{document}
\[
\stackon[-\dp\strutbox]{}{\dfrac{1}{a+b\strut}} \} = 1
\]
\end{document}

enter image description here

Alternately,

\documentclass{article}
\usepackage{stackengine,amsmath}
\stackMath
\begin{document}
\[
\stackon[0pt]{}{\dfrac{1}{\smash{a+b}}} \} = 1
\]
\end{document}

A variant of the good previous answer could be using aligned with a matrix as in the figure (for the denominator):

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage{mathtools}
\begin{document}
\[\begin{aligned}
\frac{1}{a + b} & \begin{matrix}  & \\ \,\}=1\end{matrix}
\end{aligned}\] 
\end{document}