Does existence of a left or right inverse imply existence of inverses? [duplicate]

The answer is yes. Suppose $a$ has right inverse but not left inverse: $ab=e$. Then let $f=ba$. We have $ f^2= baba=ba=f$ and $f\ne e$. The element $f$ has a left or right inverse $c$. Suppose $fc=e$ , Then $f=fe=ffc=fc=e$, so $f=e$, a contradiction. If $cf =e$ then $f=ef=cff=cf=e$, again a contradiction.