The issue of when projective modules are free is discussed in $\S 3.5.4$ of my commutative algebra notes. In particular one gets very easy (but not very satisfying) examples by looking at disconnected rings: e.g. $\mathbb{C} \times \{0\}$ is quite clearly projective but not free over $\mathbb{C} \times \mathbb{C}$.
It is more interesting to ask for examples over domains. One huge class of examples comes from invertible fractional ideals which are not principal. In particular a Dedekind domain possesses such ideals iff it is not a PID. This is worked out much later in my notes in the section on Dedekind domains (currently $\S 22$, but this is subject to change). However, in $\S 3.5.4$ I take some time to exhibit from scratch a specific projective, nonfree module over $R=\mathbb{Z}[\sqrt{-5}]$.
Note that free implies torsionfree holds for modules over a domain $R$. (In fact the usual definition of "torsionfree module" is only useful over domains, so far as I know. I seem to recall that Lam's book Lectures on modules and rings gives a more sophisticated definition for modules over a general ring...) To be more precise, over any commutative ring $R$, free $\implies$ projective $\implies$ flat, and over a domain flat $\implies$ torsionfree. So any example of a projective nonfree module over a domain is also an example of a torsionfree nonfree module.
Over a general domain there is a vast gap between torsion free modules and flat modules. For instance, a prime ideal $\mathfrak{p}$ in a Noetherian domain is always a torsionfree module, but it is flat only if it has height at most one. However, a torsionfree module over a PID is flat -- see e.g. $\S 3.11$ of my notes -- but need not be free. For instance, let $R$ be any PID which is not a field and let $K$ be its field of fractions. Then $K$ is a nontrivial torsionfree $R$-module which is divisible, hence not free.