TITLE: Equivalent definitions of invertible modules
QUESTION [26 upvotes]: Let $R$ be commutative unital ring, and $M$ an $R$-module. $M$ is called invertible (a.k.a. projective module of rank one), if it is finitely generated, and $M_{\mathfrak{p}} \cong R_{\mathfrak{p}}$ for every $\mathfrak{p} \in \operatorname{Spec} R$. Equivalently, there are $a_1, \dotsc, a_n \in R$ such that $(a_1, \dotsc, a_n) = R$ and $M_{a_i} \cong R_{a_i}$ for every $i$. There is a third equivalent definition: $M$ is finitely generated, and there is an $R$-module $N$ such that $M \otimes_R N \cong R$.
See e.g. Bourbaki: Commutative Algebra, II, 5.4, Theorem 3, or Proposition 19.8 in Pete Clark's note on Commutative Algebra. Both of these references assume that $M$ is finitely generated in the third definition.
My question: is the finitely generatedness really necessary in the last definition? It seems to me that if $M \otimes_R N \cong R$, then $M$ and $N$ are automatically finitely generated. This would make the last definition really simple.
Remark: I have a proof in mind, so as a second question: is the following argument correct?
If $\varphi \colon M \otimes N \to R$ is an isomorphism, then $\varphi^{-1}(1) = \sum_{i=1}^s x_i \otimes y_i$ for some $x_i \in M$ and $y_i \in N$. Then let $M'$ be the submodule of $M$ generated by $x_1, \dotsc, x_s$. The composition $M' \otimes N \xrightarrow{\sigma} M \otimes N \xrightarrow{\varphi} R$ is surjective (because $\sum_{i=1}^r x_i \otimes y_i \in M' \otimes N$ goes to $1 \in R$), and $\varphi$ is an isomorphism, so $\sigma$ is also surjective. Let $M'' = M/M'$, so $0 \to M' \to M \to M'' \to 0$ is exact. Then $M' \otimes N \xrightarrow{\sigma} M \otimes N \to M'' \otimes N \to 0$ is also exact. However $\sigma$ is surjective, thus $M'' \otimes N = 0$. But then
$$
0 = (M'' \otimes N) \otimes M \cong M'' \otimes (N \otimes M) \cong M'' \otimes R \cong M'',
$$
therefore $M = M'$. So $M$ is indeed finitely generated.

REPLY [9 votes]: Here are two categorical comments.
The first is that $M$ is an invertible module in the sense of having an inverse with respect to the tensor product (and why would you pick any other definition? "Invertible" is right there in the name!) iff the functor 
$$\text{Mod}(R) \ni N \mapsto N \otimes_R M \in \text{Mod}(R)$$ 
is an autoequivalence. This functor sends the unit module $R$ to $M$, from which it follows that invertible modules inherit any categorical properties that the unit possesses. Finite presentation turns out to be such a categorical property (namely, it is the categorical property of compactness), as is projectivity, and since both properties hold of $R$ they necessarily hold of any invertible module. Finite presentation and projectivity together are equivalent to another categorical condition called tininess. 
This is a completely general observation valid in any monoidal category: invertible objects always inherit any categorical properties the unit possesses.
The second is that we can do just as well with a natural weakening of invertibility, namely dualizability. It's straightforward to show, with a proof very similar to the proof in the OP (that doesn't pass through compactness or tininess), that the dualizable modules are precisely the finitely presented projective modules; see here for details.