Does $R$ have to be a PID in order for all f.g. torsion-free $R$-modules to be free?

A simple counterexample to Theorem A for non-PIDs is the following: Let $R=K[x,y]$ with $K$ any field and consider the non-principal ideal $$ I=(x,y)=\{\hbox{$xP(x,y)+yQ(x,y)$ where $P$, $Q\in R$}\} $$ Then $I$ is not free over $R$ because, for instance, $xR\cap yR\neq(0)$ although it's a submodule of a free $R$-module ($R$ itself!).


Here are two facts which are (I believe) relevant to your question.

1: For a commutative integral domain $R$, the following are equivalent:
(i) Every submodule of a free $R$-module is free, and of equal or smaller rank.
(ii) Every submodule of a finitely generated free $R$-module is free.
(iii) $R$ is a principal ideal domain.

Proof:

(i) $\implies$ (ii) is immediate.
(ii) $\implies$ (iii): $R = (1)$ is a finitely generated free $R$-module, and the $R$-submodules of $R$ are precisely the ideals. It is easy to see that an ideal is free as an $R$-module iff it is free of rank $1$ iff it is principal.
(iii) $\implies$ (i): This is your Theorem A. For a proof using methods from commutative algebra -- and valid for not necessarily finitely generated modules -- see $\S 3.9$ of my commutative algebra notes.

2: For a commutative integral domain $R$, the following are equivalent:
(i) Every finitely generated torsionfree $R$-module is free.
(ii) $R$ is a Bezout domain, that is, every finitely generated ideal is principal.

Proof: (i) $\implies$ (ii): A finitely generated ideal $I$ of $R$ is a finitely generated torsionfree $R$-module, so by hypothesis $I$ is a free $R$-module. As above, this implies that $I$ is principal.
(ii) $\implies$ (i): An integral domain $R$ has the property that every finitely generated torsionfree $R$-module is projective iff $R$ is a Prüfer domain: every finitely generated ideal is invertible. Since principal ideals are invertible, this property holds for Bezout domains. Moreover, it is a theorem of Albrecht that every finitely generated projective module over a Bezout domain is free. Proofs of both of these facts can be found in Chapter 2 of T.Y. Lam's Lectures on Modules and Rings. (Probably they will be in my commutative algebra notes eventually, but they are not there at present.)

Added: I have recently added proofs of the above results to my commutative algebra notes. Please see $\S 3.9.2$: hereditary and semihereditary rings.