Let $A$ be an integral domain. I have to show that two ideals $\mathfrak a$ and $\mathfrak b$ are isomorphic as $A$-modules if and only if there exist $a$ and $b$ such that $a\mathfrak b=b\mathfrak a$.
I gather that for "$\Leftarrow$" the isomorphism is $x\rightarrow a^{-1}bx$ or something, but I can't prove that $a$ and $b$ have inverses.
My question is: why are $a$ and $b$ invertible?