I am not very familiar with flatness so I was trying to get a feel of what precisely is the crux of the notion, using objects I am used to. Sadly, most of the counter examples I could find where for polynomial ring or involving torsion, whereas I am hoping to make explicit the following. It was suggested by Lang, but details being left to the reader, I tried my luck.
The general setting is a number ring $\mathcal O$, not integrally closed, in a number field. While all fractional $\mathcal O$-ideals are finitely generated, it is well-known that precisely because of non-integrally closedness, there are some non invertible ideals there. A concrete, classic example is $\mathcal O = \mathbb Z[\sqrt{-3}]$, which has "a singularity" above the prime $2$. Let me write $\alpha = \sqrt{-3}$, since any square root of an integer congruent to $1 \bmod 4$ is fine.
More precisely, the ideal $\mathcal P = 2\mathcal O + (1+\alpha)\mathcal O$ is prime, and we have strict inclusions $\mathcal P^2 \subset 2\mathcal O \subset \mathcal P$. Also, $\mathcal P$ cannot be principal nor invertible because $\mathcal P^2 = 2\mathcal P$. In particular, it is not a projective module. Since it is finitely generated and not projective, it cannot be flat. If I understand one characterization of flatness, it means that there must be some ideal $\mathfrak a$ such that $\mathfrak a\otimes \mathcal P$ is not isomorphic to $\mathfrak a\mathcal P$. I claim that $\mathcal P$ is precisely one of them, or in other words, that $\mathcal P\otimes \mathcal P$ is not isomorphic to $\mathcal P^2$.
I think I managed to show this, but I am not sure about my proof/arguments, so I am gladly taking advices, hints, or better arguments. I am happily accepting less pedestrian arguments too, but if they involve $\mbox{Tor}$, then I also happily accept details. Also if there is a more elementary proof I'd be delighted.
I start with the short exact sequence $$ 0 \rightarrow 2\mathcal O \rightarrow^i \mathcal P \rightarrow^\pi \mathcal P/\mathcal 2\mathcal O \rightarrow 0,$$ where the second arrow is the inclusion and the third arrow is the natural projection. Tensoring, we get an exact sequence $$2\mathcal O\otimes \mathcal P \rightarrow^{i\otimes 1} \mathcal P\otimes \mathcal P \rightarrow^{\pi\otimes 1} \mathcal P/\mathcal 2\mathcal O \otimes \mathcal P \rightarrow 0,$$ where the second arrow is still surjective. I can identify the left term: since $2\mathcal O$ is principal, it is invertible, so projective and flat, and so $2\mathcal O\otimes \mathcal P \simeq 2\mathcal P$. The right term requires a bit more work: I checked that $\mathcal P/2\mathcal O$ is a module with two elements $\overline{0}, \overline{1+\alpha}$. I then manually checked that there are only $4$ elements in the module $R := \mathcal P/\mathcal 2\mathcal O \otimes \mathcal P$, using that $(1+\alpha)^2 = 2\alpha - 2$, and that these are all $2$-torsion.
By exactness, this also means that $i\otimes 1$ is not surjective. I think it is injective, however. Any element in $2\mathcal O\otimes \mathcal P$ can be written as $$ e = 2\otimes (2\sum_i \lambda_i + (1+\alpha)\sum_j \mu_j),$$ for some $\lambda_i, \mu_j \in \mathcal O$. Asking that $(i\otimes 1)(t) = 0$ implies (this is where I am feeling weird about it) that $2\sum_i \lambda_i + (1+\alpha)\sum_j \mu_j = 0$, which in turns means $t=0$, so $i\otimes 1$ is indeed injective. All in all, this already means that $\mathcal P^2$ is (isomorphic to) a strict submodule of $\mathcal P\otimes \mathcal P$. If $\mathcal P$ was flat, we would have $\mathcal P/2\mathcal O\otimes \mathcal P \simeq \mathcal P^2/2\mathcal P=0$ and then surjectivity would ensures. Now, my intuition is that $\mathcal P\otimes \mathcal P\simeq \mathcal P$, but I do not have yet an sound argument for it.
Notably, $\mathcal O/\mathcal P$ is $\mathbb F_2$, and tensoring with $\mathcal P$ turns it into a ring with $4$ elements, all being $2$-torsion. So, tensoring adds some weird torsion here (probably the non-flatness acting?).
Again, any help, comments, suggestions on this example are much appreciated.