Here is an answer to the extra question regarding regular rings:
A finitely generated module is flat if and only if it is locally free, so for finitely generated modules your question translates to:
Q1 When is a torsion-free module/sheaf locally free?
and
Q2 What is a simple example of a torsion-free (say coherent) sheaf on a smooth algebraic variety that is not locally free?
So, first of all, the locus where a torsion-free coherent sheaf on a smooth algebraic variety fails to be locally free is at least of codimension $2$, in particular we have the following partial answer to Q1:
A 1.1 Any torsion-free coherent sheaf on a smooth algebraic curve is locally free.
This is not true in higher dimensions and you can find a counter example on any smooth algebraic variety of dimension at least $2$:
A 2 Let $X$ be a smooth algebraic variety of dimension at least $2$ (e.g., $\mathbb A^2$) and let $\mathcal F=\mathfrak m_x\subset \mathcal O_X$ the (maximal) ideal of a closed point $x\in X$. Then $\mathcal F$ is not flat. (This should qualify as the simplest example possible with the requirement of $X$ being smooth given A1 above).
Proof of A 2 This ideal is isomorphic to $\mathcal O_X$ on the open set $X\setminus\{x\}$, but cannot be generated with less number of elements than the dimension of the local ring $\dim \mathcal O_{X,x}\geq 2$, so it cannot be locally free.
On a surface you have to do a little better to get local freeness:
The locus where a reflexive sheaf is not locally free is at least of codimension $3$, so
A 1.2 Any reflexive sheaf on a smooth algebraic surface is locally free.
Being reflexive is equivalent to torsion-free and $S_2$. See more on $S_2$ in this answer.