In the setup in the question, it should really say "we could have invertible meromorphic functions on Spec($A$) that don't come Frac($A)^{\times}$", since those are what give rise to "extra principal Cartier divisors". This is what I will prove cannot happen. The argument is a correction on an earlier attempt which had a bone-headed error. [Kleiman's construction from Georges' answer is not invertible, so no inconsistency. Kleiman makes some unfortunate typos -- his $\oplus k(Q)$ should be $\prod k(Q)$, and more seriously the $t$ at the end of his construction should be $\tau$, for example -- but not a big nuisance.]
For anyone curious about general background on meromorphic functions on arbitrary schemes, see EGA IV$_4$, sec. 20, esp. 20.1.3, 20.1.4. (There is a little subtle error: in (20.1.3), $\Gamma(U,\mathcal{S})$ should consist of locally regular sections of $O_X$; this is the issue in the Kleiman reference mentioned by Georges. The content of EGA works just fine upon making that little correction. There are more hilarious errors elsewhere in IV$_4$, all correctable, such as fractions with infinite numerator and denominator, but that's a story for another day.) Also, 20.2.12 there is the result cited from Qing Liu's book in the setup for the question.
The first step in the proof is the observation that for any scheme $X$, the ring $M(X)$ of meromorphic functions is naturally identified with the direct limit of the modules Hom($J, O_X)$ as $J$ varies through quasi-coherent ideals which contain a regular section of $O_X$ Zariski-locally on $X$. Basically, such $J$ are precisely the quasi-coherent "ideals of denominators" of global meromorphic functions. This description of $M(X)$ is left to the reader as an exercise, or see section 2 of the paper "Moishezon spaces in rigid-analytic geometry" on my webpage for the solution, given there in the rigid-analytic case but by methods which are perfectly general.
Now working on Spec($A$), a global meromorphic function "is" an $A$-linear map $f:J \rightarrow A$ for an ideal $J$ that contains a non-zero-divisor Zariski-locally on $A$.
Assume $f$ is an invertible meromorphic function: there are finitely many $s_i \in J$ and a finite open cover {$U_i$} of Spec($A$) (yes, same index set) so that $s_i$ and $f(s_i)$ are non-zero-divisors on $U_i$; we may and do assume each $U_i$ is quasi-compact. Let $S$ be the non-zero-divisors in $A$. Hypotheses are preserved by $S$-localizing, and it suffices to solve after such localization (exercise). So without loss of generality each element of $A$ is either a zero-divisor or a unit. If $J=A$ then $f(x)=ax$ for some $a \in A$, so $a s_i=f(s_i)$ on each $U_i$, so all $a|_{U_i}$ are regular, so $a$ is not a zero-divisor in $A$, so $a$ is a unit in $A$ (due to the special properties we have arranged for $A$). Hence, it suffices to show $J=A$.
Since the zero scheme $V({\rm{Ann}}(s_i))$ is disjoint from $U_i$ (as $s_i|_ {U_i}$ is a regular section), the closed sets $V({\rm{Ann}}(s_i))$ and $V({\rm{Ann}}(s_2))$ have
intersection disjoint from $U_1 \cup U_2$. In other words, the quasi-coherent ideals ${\rm{Ann}}(s_1)$ and ${\rm{Ann}}(s_2)$ generate the unit ideal over $U_1 \cup U_2$.
A quasi-coherent sheaf is generated by global sections over any quasi-affine scheme, such as $U_1 \cup U_2$ (a quasi-compact open in an affine scheme), so we get $a_1 \in {\rm{Ann}}(s_1)$ and $a_2 \in {\rm{Ann}}(s_2)$ such that $a_1 + a_2 = 1$ on $U_1 \cup U_2$. Multiplying both sides by $s_1 s_2$, we get that $s_1 s_2 = 0$ on $U_1 \cup U_2$. But
$s_1$ is a regular section over $U_1$, so $s_2|_ {U_1} = 0$. But $s_2|_ {U_2}$ is a regular section, so we conclude that $U_1$ and $U_2$ are disjoint. This argument shows that the $U_i$ are pairwise disjoint.
Thus, {$U_i$} is a finite disjoint open cover of Spec($A$), so in fact each $U_i = {\rm{Spec}}(A_i)$ with $A = \prod A_i$. But recall that in $A$ every non-unit is a zero-divisor. It follows that the same holds for each $A_i$ (by inserting 1's in the other factor rings), so each regular section $s_i|_ {U_i} \in A_i$ is a unit. But the preceding argument likewise shows that $s_i|_ {U_j} = 0$ in $A_j$ for $j \ne i$, so each $s_i \in A$ has a unit component along the $i$th factor and vanishing component along the other factors. Hence, the $s_i$ generate 1, so $J = A$. QED
For a finitely generated module $M$ over a commutative ring $R$, the first definition gives a rank function $r_M: \operatorname{Spec} R \rightarrow \mathbb{N}$, whereas the third definition gives $r_M((0))$.
When $M$ is projective, $r_M$ is locally constant, so when $\operatorname{Spec} R$ is connected -- so when $R$ is a domain -- $r_M$ is constant and may be identified with its value at $(0)$. I think you are asking for reassurance that for finitely generated non-projective modules over a domain, the rank function need not be constant. That's certainly true: take $\mathbb{Z}/p\mathbb{Z}$ over $\mathbb{Z}$ (or even over $\mathbb{Z}_p$): then the rank function is $1$ at $(p)$ and otherwise $0$, so the first definition really is not the same as the third.
Is this a problem? I don't think so. Asking for terminology in mathematics to be globally consistent seems to be asking for too much: even more basic and central terms like "ring" and "manifold" do not have completely consistent definitions across all the mathematical literature: rather, they overlap enough to carry a common idea. That is certainly the case here.
Similarly, asking which of 1) and 3) is "right" doesn't seem so fruitful. It is true that the first definition records more information than the third definition. But it's just terminology, and it is often useful to have a term which records exactly the information in the third definition: e.g. the "rank of an abelian group" is a very standard and useful notion, and usually often it means 3). (I am a number theorist, and in number theoretic contexts this definition of rank is quite standard. Apparently it is less so elsewhere...) For a finitely generated module over a PID, of course the rank in the sense of 3) is exactly what you need in addition to the torsion subgroup in order to reconstruct the module. In this context the rank function 1) gives some information about the torsion but not complete information -- e.g. $\mathbb{Z}/p\mathbb{Z}$ and $\mathbb{Z}/p^2\mathbb{Z}$ have the same rank function -- so the rank function as in 1) does not seem especially natural or useful. I am (almost) sure there are other contexts where it would be natural and useful to think in terms of the rank function as in 1).
Added: Following quid's comments I checked out Fuchs's text on infinite abelian groups, and indeed the rank of an arbitrary abelian group is defined in a way so as to take $p$-primary torsion into account. (I simply didn't know this was true.) Thus the rank defined there would be the sum over all the values of the rank function in the sense of 1).
All this seems to indicate, even more than my answer, that different notions of rank proliferate.
Added Later: Quid also suggests consideration of the quantity $\operatorname{mg}(M)$, the minimal number of generators of an $R$-module $M$: this is a cardinal invariant which is (clearly) finite if and only if $M$ is finitely generated. Let $R$ be a Dedekind domain with fraction field $K$. For a maximal ideal $\mathfrak{p}$ of $R$ and a finitely generated $R$-module $M$, let $M[\mathfrak{p}^{\infty}]$ be the submodule of $M$ consisting of elements annihilated by some power of $\mathfrak{p}$. Then $M[\mathfrak{p}^{\infty}]$ is a finitely generated torsion module over the DVR $R_{\mathfrak{p}}$ and is thus a direct sum of $\operatorname{mg}(M[\mathfrak{p}^{\infty}])$ copies of $R_{\mathfrak{p}}/\mathfrak{p}^k R_{\mathfrak{p}}$. Let us define $tr(M,\mathfrak{p})$ to be this number of copies. (When $M$ is infinitely generated I believe one should also count copies of $K_{\mathfrak{p}}/R_{\mathfrak{p}}$ in a certain sense in order to recover Fuchs's $p$-primary torsion rank in the $R = \mathbb{Z}$ case. Let me omit this for now.)
Now define
$R(M) = r_M((0)) + \sum_{\mathfrak{p} \in \operatorname{MaxSpec} R} tr(M,\mathfrak{p})$
When $R = \mathbb{Z}$ then $R(M) = \operatorname{mg}(M)$ is the "total rank" in Fuchs's sense. More generally $R(M) = \operatorname{mg}(M)$ when $R$ is a PID. However, I wanted to point out that in general the function $\operatorname{mg}$ behaves rather badly. This is discussed in $\S$ 6.5.3 of my commutative algebra notes. In particular, when $M$ is finitely generated projective, $\operatorname{mg}(M) \geq R(M) (= r_M((0))$ but can be larger. However, it is much more restricted than what I knew about before reading the comments on this question. In particular, it follows from the Forster-Swan Theorem that when $M$ is projective of rank $n$ then $\operatorname{mg}(M) \in \{n,n+1\}$. (In an earlier version of this answer I knew only that $\operatorname{mg}(M) \leq 2n-1$ and "guessed" that it could be that large over suitable Dedekind domains. Not a terrible guess, perhaps, but not the most educated one either...)
Best Answer
No, being torsion is not a local property, and I can give a counterexample. [Edit: This took some doing, with my initial answer containing a serious flaw. After completely reworking the construction, this should work now. Apologies for the length of this answer, but I don't see any quick constructions].
The idea is to construct a ring $R$ and an ideal $I$ contained in the zero divisors of $R$, and $f_1,f_2\in R$ satisfying $f_1+f_2=1$ such that $I_{f_i}$ contains a regular element of $R_{f_i}$ for each $i$. This provides a counterexample to the question by taking the module $M=R/I$ and $m=I+1$. Then, ${\rm ann}(m)=I$ consists of zero divisors, so $m$ is not torsion. However, mapping $m$ into $M_{f_i}$ takes ${\rm ann}(m)$ to $I_{f_i}$, which contains regular elements of $R_{f_i}$. So, $m$ is torsion in each $M_{f_i}$.
This does get rather involved, so let's start simple and construct an example showing that being torsion is not a stalk-local property.
Choose a field $k$, set $A=k[X_0,X_1,X_1,X_2,\ldots]$ and let $J$ be the ideal generated by $X_iX_j$ for $i\not=j$ and $X_i(X_i-1)$ for $i\ge1$. Then, $R=A/J$ is the $k$-algebra generated by elements $x_0,x_1,\ldots$ satisfying the relations $x_ix_j=0$ for $i\not=j$ and $x_i(x_i-1)=0$ for $i\ge1$. Let $I\subseteq R$ be the ideal generated by $x_0,x_1,\ldots$. We can see that $x_i\not=0$ by considering the $k$-morphism $A\to k$ taking $X_j$ to 1 (some fixed $j$) and $X_i$ to 0 for $i\not=j$. This takes $J$ to 0, so it defines a $k$-morphism $R\to k$ mapping $x_j$ to 1, so $x_j\not=0$. Then, every $a\in I$ satisfies $ax_j=0$ for large $j$, showing that it is a zero divisor. Also, the $k$-morphism $A\to k$ taking each $X_i$ to zero contains $J$ in its kernel, and defines a morphism $R\to\mathcal{k}$ with kernel $I$, showing that $R/I\cong k$. So $I$ is a maximal ideal. For any prime $\mathfrak{p}$ we either have $\mathfrak{p}\not=I$, in which case the non-empty set $I\setminus\mathfrak{p}$ maps to units (and hence, regular elements) in $R_{\mathfrak{p}}$. Or, we have $\mathfrak{p}=I$ in which case $x_i-1$ maps to a unit and $x_i$ goes to zero in $R_{\mathfrak{p}}$ ($i\ge1$). So, $R_{\mathfrak{p}}\cong k[X]$ with $x_0$ going to the regular element $X$. This shows that $I$ contains regular elements in the localization at any prime, giving the required counterexample for the stalk-local case.
Now, let's move on to the full construction of the counterexample showing that being torsion is not a local property. Simply guessing a set of generators and relations as for the stalk-local case didn't work out so well. Instead, I will start with a simple example of a polynomial ring and then transform it in such a way as to give the properties we are looking for. I find it helpful to first fix the following notation: Start with the base (polynomial) ring $R=\mathbb{Z}[x,y,z]$. A (commutative, unitial) R-algebra is simply a ring with three distinguished elements $x,y,z$, and a morphism of R-algebras is just a ring homomorphism respecting these distinguished elements. For an R-algebra $A$, define $K(A)\subseteq A$ to be the smallest ideal such that, for all $a\in A$, $$ \begin{align} ax\in K(A)&\Rightarrow az\in K(A),\\\\ ay\in K(A)&\Rightarrow a(1-z)\in K(A). \end{align} $$ In particular, $K(A)=0$ implies that $x$ is a regular element in the localization $A_z$ and $y$ is a regular element in $A_{1-z}$. If we can construct such an example where the ideal $Ax+Ay$ consists purely of zero divisors, then that will give the counterexample needed. The idea is to start with $A=\mathbb{Z}[x,y,z]$ and transform it using the following steps.
The first step above is easy enough. However, we do need to be careful to check that the second step does not undo the first. Suppose that $a\in A$ is a zero divisor, so that $ab=0$ for some non-zero $b$. It is possible that taking the quotient in the second step above takes $b$ to zero, so that $a$ becomes a regular element again. To get around this, we need some stronger condition on $b$ which implies $b\not=0$ and is also stable under taking the quotient. Note that $A(1-b)$ being a proper ideal or, equivalently, $A/(1-b)$ being nontrivial, will imply that $b\not=0$. In turn, this is implied by $K(A/(1-b))$ being a proper ideal. As it turns out, this property of $b$ does remain stable under each of the steps above, and can be used to show that this construction does give the counterexample required. However, note that if $ab=0$ and $K(A/(1-b))$ is proper, then $a=a(1-b)\in A(1-b)$, from which we can deduce that $K(A/(a))$ is a proper ideal. This necessary condition is unchanged by either of the steps above, so we had better check that elements $a\in Ax+Ay$ in our R-algebra do satisfy this from the outset. I'll make the following definition: $A$ satisfies property (P) if $K(A/(a))$ is proper for every $a\in Ax+Ay$. As it turns out, polynomial rings do satisfy this property and, consequently, the construction outlined above works fine.
Now on to the details of the argument.
As $f^{-1}(K(B))$ satisfies the defining properties for $K(A)$ (other than minimality), it contains $K(A)$. In particular, if $K(B)$ is proper then $K(A)\subseteq f^{-1}(K(B))$ is proper. Next, if $f(I)\subseteq J$ are ideals, then $f$ induces an R-morphism $A/I\to B/J$ so, if $K(B/J)$ is proper then so is $K(A/I)$.
If $B$ satisfies property (P) and $a\in Ax+Ay$ then $f(a)\in Bx+By$ and $K(B/f(a))$ is proper. So, $K(A/(a))$ is proper and $A$ also satisfies property (P).
As $A$ is non-trivial, it must have a maximal ideal $\mathfrak{m}$. Applying (1) to the R-morphism $A[x,y,z]\to(A/\mathfrak{m})[x,y,z]$ reduces to the case where $A=k$ is a field. Then, letting $\bar k$ be the algebraic closure, applying (1) to $k[x,y,z]\to\bar k[x,y,z]$ reduces to the case where $A=k$ is an algebraically closed field.
Now set $B=k[x,y,z]$ and choose $a\in Bx+By$. The idea is to look at the morphism $\theta\colon B/(a)\to k$ taking $x,y,z$ to some $x_0,y_0,z_0\in k$ with $a(x_0,y_0,z_0)=0$. As long as these satisfy $ux_0=0\Rightarrow uz_0=0$ and $uy_0=0\Rightarrow u(1-z_0)=0$ (all $u\in k$) then $K(B/(a))$ will be contained in the kernel of $\theta$, so will be proper. For this to be the case it is enough that both ($x_0\not=0$ or $z_0=0$) and ($y_0\not=0$ or $z_0=1$).
Case 1: We can find $a(x_0,y_0,z_0)=0$ such that $x_0y_0\not=0$. This satisfies the required condition.
Case 2: Whenever $a(x_0,y_0,z_0)=0$ then $x_0y_0=0$. This means that $xy$ is contained in the radical ideal generated by $a$, so $a$ divides $x^ry^r$ some $r\ge1$. Then $a$ is a multiple of $x$ or $y$ and one of $(x_0,y_0,z_0)=(0,1,0)$ or $(1,0,1)$ satisfies the required condition. So, $K(B/(a))$ is proper.
Next, we construct extensions of the R-algebra forcing elements of $Ax+Ay$ to be zero-divisors.
To construct the morphism, set $I=Ax+Ay$ and let $(X_a)_{a\in I}$ be indeterminates over $A$. Let $J$ be the ideal in $A[(X_a)_{a\in I}]$ generated by $(aX_a)_{a\in I}$. Then define $B=R[(X_a)_{a\in I}]/J$ and let $f$ be the canonical homomorphism. Its left inverse is the map taking $X_a$ to 0.
Now, for a fixed $a\in I$, set $b=J+X_a$, so $ab=0$. Consider the morphism $A[(X_c)_{c\in I}]\to A\to A/(a)$ taking each $X_c$ to 0 (for $c\not=a$) and $X_a$ to 1. As its kernel contains $J$, it defines a morphism $g\colon B\to A/(a)$, which takes $b$ to one. Therefore, the ideal $B(1-b)$ maps to 0 and, as $K(A/(a))$ is proper, (1) says that $K(B/(1-b))$ is proper.
Set $A_0=A$ and use (3) to construct a sequence of extensions $f_i\colon A_i\to A_{i+1}$ with left inverses such that, for every $a\in A_ix+A_iy$ there is a $b\in A_{i+1}$ with $ab=0$ and $K(A_{i+1}/(1-b))$ is proper. Note that, as each $f_i$ has a left inverse, (1) says that $A_{i+1}$ satisfies (P) whenever $A_i$ does. So, we can keep applying (3) to build up the entire sequence of extensions.
We now take the colimit $B={\rm colim}A_i$ and let $f$ be the induced morphism (i.e, if we consider $A_i\subseteq A_{i+1}$ then $B$ is the union and $f$ is inclusion). As each $A_i\to B$ has a left-inverse, (1) shows that the required properties for $B$ are inherited from the individual $A_i$.
That $K(B)=0$ follows quickly from the definition of $K$. Suppose $a\in Ax+Ay,b\in A$ are such that $ab=0$ and $K(A/(1-b))$ is proper. Set $C=A/(1-b)$, so that $C/K(C)$ is not trivial. By (1), the canonical morphism $A\to C$ maps $K(A)$ into $K(C)$. So, it induces a morphism $B\to C/K(C)$. This takes $1-b$ to zero, so it induces an R-morphism $B/(1-b)\to C/K(C)$. As $K(C/K(C))=0$, (1) implies that $K(B/(1-b))$ maps to zero, so is proper.
For any $a\in I$ there is a $b\in B$ with $ab=0$ and $K(B/(1-b))$ proper. In particular, $(1-b)$ must be a proper ideal, so that $b\not=0$ and $a$ is a zero divisor.
Finally, the property $K(B)=0$ implies that $x$ is regular in $B_z$ and $y$ is regular in $B_{1-z}$.