I know this is the case if $R$ is a PID, but PID's are special instances of Integral Domains, so I am wondering if there is a counter-example to the case where R is an integral domain.
This post shows the result when $R$ is a Principal Ideal Domain: Proof about finitely generated torsion-free R-module M is free, where R is a PID