It follows from the following result :
Prop. Let $R$ be a ring, and let $M$ be a noetherian (say left) $R$-module. Then any surjective endomorphism of $M$ is bijective.
Now assume that $ab=1$ in $R$, and consider the endomorphism $x\in R\mapsto xb\in R$.
Then it is surjective, since $r=(ra)b$ for all $r\in R$. By the proposition above, it is bijective, hence injective. Now we have $(ba-1)b=bab-b=
b-b=0$ and finally $ba-1=0$ by injectivity.
Proof of the proposition. Let $u:M\to M$ be a surjective endomorphism. The sequence of submodules $\ker(u)\subset \ker(u^2)\subset\cdots \subset \ker(u^n)\subset \cdots$ is nondecreasing, hence stationary since $M$ is noetherian. So there is some $n\geq 1$ such that $\ker(u^n)=\ker(u^{n+1})$. Let $x\in\ker(u)$. Since $u$ is surjective, so is $u^n$, and we can pick $y\in M$ such that $x=u^n(y)$. Now $u^{n+1}(y)=u(x)=0$, so $y\in\ker(u^{n+1})=\ker(u^n)$, and $x=u^n(y)=0$. Therefore, $u$ is also injective and we are done.