A characterization of invertible fractional ideals of an integral domain Let $A$ be an integral domain, $K$ its field of fractions.
Let $M$ be a fractional ideal of $A$.
I'd like to prove that $M$ is invertible if and only if $MA_P$ is a principal fractional ideal of $A_P$ for every maximal ideal $P$ of $A$.
EDIT
As Georges Elencwajg pointed out, it seems that we need to assume $M$ is finitely generated to prove if part.
 A: Reminder
A non zero fractional ideal is invertible if and only if it is projective , and then it has rank one.
a) If $M$ is invertible it is projective and non-zero. Hence $M_P$ is also non-zero and projective of rank one over $A_P$, hence free of rank one because $A_P$ is local and thus a principal fractional ideal for $A_P$.
b) Here I assume that $M$ is  finitely generated  over $A$.
If  $M_P$ is  principal fractional  it  certainly is free of rank one, hence  projective of rank one .
Since this is true for all maximal $P$  , the module  $M$ is (non-zero) projective: this is where I use that $M$ is finitely generated .
Hence $M$ is an invertible fractional ideal of $A$, according to the Reminder.
A: I'll prove the title assertions (Proposition 1 and Proposition 2) using the following lemmas.
Lemma 1
Let $A$ be an integral domain.
Let $M$ be an invertible fractional ideal of A.
Then $M$ is finitely generated as an $A$-module.
Proof:
There exists a fractional ideal $N$ of $A$ such that $MN = A$.
Hence there exist $x_i \in M, y_i \in N, i = 1, ..., n$ such that $1 = \sum x_iy_i$.
Hence, for every $x \in M$, $x = \sum x_i(xy_i)$.
Since $xy_i \in A$, $M$ is generated by $x_1, ..., x_n$ over $A$.
QED
Lemma 2
Let $A$ be an integral domain.
Let $M$ be an invertible fractional ideal of $A$.
Then $M$ is projective as an $A$-module.
Proof:
There exists a fractional ideal $N$ of $A$ such that $MN = A$.
Hence there exist $x_i \in M, y_i \in N, i = 1, ..., n$ such that $1 = \sum x_iy_i$.
For each i, define A-homomorphism $f_i: M \rightarrow A$ by $f_i(x) = y_ix$. 
Since $x = \sum x_i(y_ix)$ for every $x \in M$, $x = \sum f_i(x)x_i$.
As shown in the proof of Lemma 1, $M$ is generated by $x_1, ..., x_n$ over $A$.
Let $L$ be a free $A$-module with basis $e_1, ..., e_n$.
Define $A$-homomorphism $p: L \rightarrow M$ by $p(e_i) = x_i$ for each $i$.
Define $A$-homomorphism $s: M \rightarrow L$ by $s(x) = \sum f_i(x)e_i$.
Let $K = Ker(p)$.
We get an exact sequence:
$0 \rightarrow K \rightarrow L \rightarrow M \rightarrow 0$.
Since $ps = 1_M$, this sequence splits.
Hence $M$ is projective.
QED
Lemma 3
Let $A$ be a local ring.
Let $M$ be a finitely generated projective $A$-module.
Then $M$ is a free $A$-module of finite rank.
Proof:
Let $\mathfrak{m}$ be the maximal ideal of $A$.
Let $k = A/\mathfrak{m}$.
Since $M \otimes k$ is a free k-module of finite rank, there exists a free $A$-module $L$ of finite rank and
a surjective homomorphism $f: L \rightarrow M$ such that $f \otimes 1_k: L \otimes k \rightarrow M \otimes k$ is an isomorphism.
Let $K = Ker(f)$.
We get an exact sequence:
$0 \rightarrow K \rightarrow L \rightarrow M \rightarrow 0$
Since $M$ is projective, this sequence splits.
Hence the following sequence is exact.
$0 \rightarrow K \otimes k \rightarrow L \otimes k \rightarrow M \otimes k \rightarrow 0$
Since $f \otimes 1_k: L \otimes k \rightarrow M \otimes k$ is an isomorphism, $K \otimes k = 0$.
Since $K$ is a direct summand of $L$, $K$ is a finitely generated $A$-module.
Hence $K = 0$ by Nakayama's lemma.
QED
Lemma 4
Let $A$ and $B$ be commutative rings.
Let $f: A \rightarrow B$ be a homomorphism.
Let $M$ be a projective $A$-module.
Then $M \otimes_A B$ is projective as a $B$-module.
Proof:
Let $N$ be a $B$-module.
$N$ can be regarded as an $A$-module via $f$.
$Hom_B(M \otimes_A B, N)$ is canonically isomorphic to $Hom_A(M, N)$.
This isomorphism is functorial in $N$.
Since $Hom_A(M, -)$ is an exact functor, $Hom_B(M \otimes_A B, -)$ is exact.
Hence $M \otimes_A B$ is projective as a $B$-module.
QED
Lemma 5
Let $A$ be an integral domain.
Let $K$ be the field of fractions of $A$.
Let $M$ and $N$ be $A$-submodules of $K$.
Let $MN$ be the $A$-submodule of $K$ generated by the set {$xy; x \in M, y \in N$}.
Let $M^{-1} = \{x \in K; xM \subset A\}$.
Suppose $MN = A$.
Then $N = M^{-1}$.
Proof:
Since $N \subset M^{-1}$, $MN \subset MM^{-1} \subset A$.
Since $MN = A$, $MM^{-1} = A$.
Multiplying the both sides of $MN = A$ by $M^{-1}$, we get $M^{-1}MN = M^{-1}$.
Hence $N = M^{-1}$.
QED
Lemma 6
Let $A$ be an integral domain.
Let $K$ be the field of fractions of $A$.
Let $M$ be finitely generated $A$-submodule of $K$.
Let $M^{-1} = \{x \in K; xM \subset A\}$.
Let $P$ be a prime ideal of $A$.
Let $(M_P)^{-1} = \{x \in K; xM_P \subset A_P\}$.
Then $(M^{-1})_P = (M_P)^{-1}$.
Proof:
Let $x \in M^{-1}$. Since $xM \subset A$, $xM_P \subset A_P$.
Hence $x \in (M_P)^{-1}$.
Hence $M^{-1} \subset (M_P)^{-1}$.
Hence $(M^{-1})_P \subset (M_P)^{-1}$.
Let $x_1, ..., x_n$ be generators of $M$ as an $A$-module.
Let $y \in (M_P)^{-1}$.
Then $yx_i \in A_P$ for $i = 1, ..., n$.
Hense there exists $s \in A - P$ such that $syx_i \in A$ for $i = 1, ..., n$.
Since $sy \in M^{-1}$, $y \in (M^{-1})_P$.
Hence $(M_P)^{-1} \subset (M^{-1})_P$
QED
Proposition 1
Let $A$ be an integral domain, $K$ its field of fractions.
Let $M$ be an invertible fractional ideal of $A$.
Let $P$ be a prime ideal of $A$.
Then $M_P$ is a principal fractional ideal.
Proof:
By Lemma 1, $M$ is finitely generated as an $A$-module.
Hence $M_P$ is finitely generated as an $A_P$-module.
By Lemma 2, $M$ is projective as an $A$-module.
Hence by Lemma 4, $M_P$ is projective as an $A_P$-module.
Therefore, by Lemma 3, $M_P$ is a free $A_P$-module of finite rank.
Since $M_P \neq 0$ and an $A_P$-basis of $M_P$ is linearly independent over $K$, $M_P$ is a free $A_P$-module of rank 1.
Hence $M_P$ is a principal fractional ideal.
QED
Proposition 2
Let $A$ be an integral domain, $K$ its field of fractions.
Let $M$ be a finitely generated fractional ideal of $A$.
Suppose $M_P$ is a principal fractional ideal of $A_P$ for every maximal ideal $P$ of $A$.
Then $M$ is invertible.
Proof:
Let $M^{-1} = \{x \in K; xM \subset A\}$.
Let $P$ be a maximal ideal of $A$.
Hence by Lemma 6, $(M^{-1})_P = (M_P)^{-1}$.
Hence, $(MM^{-1})_P = (M_P)(M^{-1})_P = (M_P)(M_P)^{-1}$
Since $M_P$ is a principal, $M_P$ is invertible.
Hence by Lemma 5, $(M_P)(M_P)^{-1} = A_P$.
Hence $(MM^{-1})_P = A_P$.
Hence by Lemma 4 of this question, $MM^{-1} = A$.
QED
