In the Stack projects, https://stacks.math.columbia.edu/tag/05WG, the following claim is made: let $R=\mathbb{F}_2^\mathbb{N}$, and let $I$ be the ideal generated by the idempotents $e_n=(1,\ldots,1,0,\ldots, 0),n\geq 1$.
Then $I$ is projective, but not locally free.
I don't know about the projectivity property (I have to confess I was to lazy to check the details), however I pretend that $I$ IS locally free.
Step 1. $I=\mathbb{F}_2^{(\mathbb{N})}$.
Since $e_n$ lies in $\mathbb{F}_2^{(\mathbb{N})}$ for all $n\geq 1,$ we have $I\subset \mathbb{F}_2^{(\mathbb{N})}$. Conversely, if $\varepsilon_n$ denote the $n-th$ vector of the canonical basis of $\mathbb{F}_2^{(\mathbb{N})}$, then $\varepsilon_n=\varepsilon_n e_n\in I$, so we have equality.
Step 2. $I$ is locally free.
Indeed, let $\mathfrak{p}$ be a prime ideal of $R$. If $I$ is not contained in $\mathfrak{p}$, then there exists $a\in I$ not in $\mathfrak{p}$ . But $I_\mathfrak{p}$ contains the unit $\dfrac{a}{1}$, so $I_\mathfrak{p}=A_ \mathfrak{p}$, which is free. If $I$ is contained in $\mathfrak{p}$, then for all $a\in I$, $1-a$ does not lie in $\mathfrak{p}$ (otherwise $1=a+1-a$ would lie in $\mathfrak{p}$). But now $\dfrac{a}{s}=\dfrac{a(1-a)}{s(1-a)}=0$ for all $\dfrac{a}{s}\in I_\mathfrak{p}$, hence $I_\mathfrak{p}=0$, which is free.
Hence $I$ is locally free.
Questions.
Q1. Did I made any mistake ? in the affirmative, where ? (if there is one, it is probably so big that i cannot see it)
Q2. If what I wrote down is correct, could you provide me with an example of a projective module which is not locally free, simpler than the second example detailed in the link above (which is way to complicated for my students)
Thanks for your help !
Greg