For the case $R$ is a local ring it's a corollary of Nakayama's lemma.
As the notation in the above link, suppose $M$ is a finite generated projective module over $R$, then, first pick a minimal number of generators, i.e., $M=Rm_1+\cdots +Rm_k$, and $k$ is the minimal number with this property, so we get a decomposition
$$R^k=M\oplus N,$$ then, we are left to prove $N=0$.
First, applying $R/I\otimes-$, where $I$ is the unique maximal ideal in $R$, then we get $$(R/I)^k=M/IM\oplus N/IN,$$ and note that $M/IM$, $N/IN$ are vector spaces over the field $R/I$, so by comparing the dimension, we get $N/IN=0$, i.e., $N=IN$, then,
we use the Nakayama's lemma, the Statement 1 in the above link, we get $r\in 1+I$, such that $rN=0$, but $r\not \in I$ and $R$ is local implies $r$ is a unit, so $N=0$.
Remarks. 1) To get the choice of $k$, we can first assume $k=\dim_{R/I}(M/IM)$, then use the Statement 4 in the above link to lift the basis of $M/IM$ to get a minimal set of generators of $M$.
2) A deep theorem of Kaplansky says that any projective modules (not necessarily finitely generated) over a local ring is free.
Over a von Neumann regular ring, every right module (and every left module) is flat. Let $V$ be an countable dimensional $F$ vector space, and let $R$ be the ring of endomorphisms of that vector space. It's known that $R$ is a von Neumann regular ring with exactly three ideals.
The nontrivial ideal $I$ consists of the endomorphisms with finite dimensional image. Then $R/I$ is flat but it cannot be projective. If it were projective, then $I$ would be a summand of $R$... but it is not, because it's an essential ideal.
A second example over any non-Artinian VNR ring: you can take $R/E$ for any maximal essential right ideal $E$ to get a nonprojective, simple flat module. The reasons are very much the same, since a proper essential right ideal can't be a summand of the ring.
You can even make a commutative version: take an infinite direct product of fields $\prod F_i$ (this is von Neumann regular). The ideal $I=\oplus F_i$ is an essential ideal, and $R/I$ is flat, nonprojective. (This one also has the added benefit of supplying examples of ideals which are projective but not free. Any summand of the ring will do, since the ring has IBN. The argument at the other post can be carried out again.)
Incidentally, Puninski and Rothmaler have written a nifty paper investigating which rings have all f.g. flat modules projective.
Best Answer
Denote $A=\mathbb {R}[x,y]/\left<x^2+y^2-1\right>$. We first observe that $A$ is a Dedekind domain since the corresponding plane curve $C$ is smooth. The characterization of finitely generated modules over a Dedekind domain says that every such $P$ is isomorphic to $I\oplus A^r$ where $I\subset A$ is an ideal. We thus have to classify ideals of $A$ up to isomorphism of $A$-modules, i.e., we have to compute the class group of $A$. Every non-zero prime ideal of $A$ is a maximal ideal and thus is the set of all polynomials that vanish on a real point of $C$ or on a pair of complex conjugate points on $C$. In the latter case the ideal is a principal ideal: it is generated by the linear polynomial defining the line spanned by the pair of complex conjugate points. On the other hand, the vanishing ideal of a single real point is not a principal ideal: if it was generated by a polynomial $f$, then the zero set of $f$ would intersect the real part of the curve $C$ transversally in exactly one point which is not possible. However, the vanishing ideal of the union of any to real points is again a principal ideal (take again the line spanned by both points). Thus the class group of $A$ is the cyclic group of order two generated by the vanishing ideal of a single real point, say $\langle x,y-1\rangle$.
Therefore, every finitely generated projective module over $A$ is either isomorphic to $A^r$ or to $A^r\oplus \langle x,y-1\rangle$.