This is a followup to a previous question

What is the right definition of the Picard group of a commutative ring?

where I was worried about the distinction between invertible modules and rank one projective modules over an arbitrary commutative ring. I was worrying too much, because of the following theorem [Bourbaki, Commutative Algebra, Section II.5.2, Theorem 1]:

Let $R$ be a commutative ring and $M$ a finitely generated $R$-module. The following are equivalent:

(i) $M$ is projective.

(ii) $M$ is finitely presented and locally free in the weaker sense: $\forall \mathfrak{p} \in \operatorname{Spec}(R), \ M_{\mathfrak{p}} \cong R_{\mathfrak{p}}^{r(\mathfrak{p})}$.

(iii) $M$ is locally free in the weaker sense and its rank function $\mathfrak{p} \mapsto r(\mathfrak{p})$ is locally constant on $\operatorname{Spec}(R)$.

(iv) $M$ is locally free in the stronger sense: there exist $f_1,\ldots,f_n \in R$, generating the unit ideal, such that for each $i$, $M_{f_i}$ is a free $R_{f_i}$-module.

(v) For every maximal ideal $\mathfrak{m}$ of $R$, there exists $f \in R \setminus \mathfrak{m}$ such that $M_f$ is a free $R_f$-module.

This answers my previous question, because the rank function of an invertible module is identically one.

In order to really feel like I understand what's going on here, I would like to see an example of a finitely generated locally free [in the weaker sense of (ii) above] module which is *not* projective. Thus $R$ must be non-Noetherian. The wikipedia article on projective modules contains some nice information, in particular sketching an example of such a module over a Boolean ring. For a Boolean ring though the localization at every prime ideal is simply $\mathbb{Z}/2\mathbb{Z}$, so it is not too surprising that there are more locally free modules than projectives.

I would like to see an example with $R$ an integral domain, if possible. It would be especially nice if you can give a reference to one of the standard texts on commutative algebra which contains such an example or at least a citation of such an example.