TITLE: Is $R$ a PID if every submodule of a free $R$-module is free?
QUESTION [13 upvotes]: Let $R$ be a commutative ring. Before I proved that every submodule of a free $R$-module is free over a P.I.D. 

Now I'm trying to prove the reciprocal, if every submodule of a free $R$-module is free, is $R$ a PID?

I couldn't find my second question here, only the first one.
Another question regarding this if it's true is how much can we "stretch" the conditions, this is, could be concluded that $R$ is a PID knowing that some submodules of a free $R$-module verify some condition? "Some condition" may sounds vague, but I couldn't think of any that will do.

REPLY [2 votes]: I prove that $R$ is an integral domain. Let $a\in R\setminus\{0\}$.
The exercise is equivalent to prove that the multiplication-by-$a$ morphism $m_a:R\rightarrow R$, $x\mapsto ax$ is injective.
By assumption $aR$ is free since is a submodule of the free $R$-module $R$. In particular there exists some isomorphism of $R$-modules $\phi:\oplus_{I}R \overset{\simeq}{\rightarrow} aR$, for some nonempty set $I$. 
As Bahador explained this implies that $I$ consists of one element.
Thus there is an isomorphism $\phi: R \rightarrow aR\subset R$ of (cyclic) $R$-modules.
Let $b=\phi(1)$ then $\phi=m_b$ and $bR = Im\, (m_b)= Im\,(\phi) = aR$.
In particular $b$ is not zero-divisor since $m_b$ is injective. Generators of a principal ideal differ by a unit if one of them is non-zero divisor so that there is some unit $u$ of $R$ such that $a=bu$.
In particular $m_a= m_u \circ m_b = m_u\circ \phi$ is injective.