This question is about example 6.11.4 in Chapter II of Hartshorne. The example is about computing the Cartier divisor class group of the cuspidal cubic curve $y^2z = x^3$ in $\mathbb{P}_{k}^{2}$. He begins by saying "note that any Cartier divisor is linearly equivalent to one whose local function is invertible in some neighbourhood of the singular point $Z = (0,0,1)$".
I am not sure what this statement means at all. A Cartier divisor is, by definition, represented by a family $\{(U_{i}, f_{i}) \}$ where the $U_{i}$ cover $X$ and the $f_{i} \in \mathcal{K}^{*}(U_{i})$. But the elements of $\mathcal{K}^{*}(U_{i})$ are invertible by definition. So every local function is invertible, right? So what does Hartshorne mean by his statement?
I agree he did not phrase it very well. Let $U$ be an open chart containing the cusp. By removing the cuspidal point from the other charts, we may assume it is the only one containing the cuspidal point. Let $f$ be the rational function on $U$. What he means, is that we may assume that $f$ is invertible in $\mathcal{O}$ (and not in $\mathcal{K}$, which would be obvious as $\mathcal{K}$ is a field). So, he is assuming that $f \in \mathcal{O}^*(V)$, where $V \subset U$ is an open set containing the cusp.
The way to achieve it is the following. Notice that $f^{-1}$ is an element of $\mathcal{K}^*$, as so is $f$. Thus, $f^{-1}$ gives a principal Cartier divisor. So, the divisor $\lbrace (U_i,f_i) \rbrace$ is the same as $\lbrace (U_i,f_i \cdot f^{-1}) \rbrace$. Since $U = U_{i_0}$ for some index ${i_0}$, this shows that we may assume that on that chart the divisor is represented by $(U,1)$.