Example of a finitely generated flat module which is not free I couldn't come up with an example of a finitely generated flat module which is not free. I know that over local rings, freeness and flatness are equivalent. So the ring cannot be a local ring. 

Here is an example that one can come up with from algebraic number theory. Consider $K = \Bbb{Q}(\sqrt{-6})$ and the ideal $I = (2,\sqrt{-6}) \subseteq \mathcal{O}_K$. This ideal is clearly finitely generated as an $\mathcal{O}_K$ module and furthermore not only is it flat but it is a projective module: we have
$$I \oplus ( 3,\sqrt{-6}) \cong (\sqrt{-6}) \oplus \mathcal{O}_K \cong \mathcal{O}_K \oplus \mathcal{O}_K.$$
If you're interested in knowing how we have such isomorphisms you can look at my answer here. But now $I$ cannot possibly be free because the generators are linearly dependent over $\mathcal{O}_K$:
$$3 \cdot (2) + \sqrt{-6} \cdot (\sqrt{-6}) = 0.$$
