I have been trying to read Fulton's Intersection Theory, and the following puzzles me.
All schemes below are algebraic over some field $k$ in the sense that they come together with a morphism of finte type to $Spec k$.
Let $X$ be a variety (reduced irreducible scheme), and let $Y$ be a codimension $1$ subvariety, and let $A$ be its local ring (in particular a $1$-dimensional Noetherian local domain). Let $K(X)$ be the ring of rational functions on $X$ (the local ring at the generic point of X). Let $K(X)^*$ be the abelian group (under multiplication) of units of $K(X)$, and $A^*$ -- the group of units of $A$.
On the one hand, for any $r\in K(X)^*$ define the order of vanishing of $r$ at $Y$ to be $ord_Y(r)=l_A(A/(a))-l_A(A/(b))$ where $r=a/b$ for $a$ and $b$, and $l_A(M)$ is the length of an $A$-module $M$. On the other hand, it turns out that $Y$ is in the support of the principal Cartier divisor $div(r)$ if and only if $r\not\in A^*\subset K(X)^*$.
It is obvious that $Y$ not in the support of $div(r)$ implies that $ord_r(Y)=0$, since the former claims that $r\in A^*$ from which it follows that $ord_Y(b)=ord_Y(rb)=ord_Y(a)$ since obviously $ord_Y(r)=0$ for any unit. The contrapositive states that $ord_r(Y)\neq0$ implies $Y$ is in the support of $div(r)$. Because the latter can be shown to be a proper closed set and thus containing finitely many codim. $1$ subvarieties, which shows that the associated Weyl divisor $[D]=\sum_Y ord_Y(r)[Y]$ is well-defined.
What is not clear to me is whether or not the converse is true, i.e. whether $Y$ in the support of $div(r)$ implies that $ord_Y(r)\neq0$. I find myself doubting since if I am not mistaken, this is equivalent to the statement $l_A(A/(a))=l_A(A/(b))$ if and only if $(a)=(b)$, where $A$ is any $1$-dimensional local Noetherian domain (maybe even a $k$-algebra) which seems much too strong. Any (geometric) examples to give me an idea of what is going would be much appreciated.