Cartier divisors of smooth curves Let $k$ be an algebraically closed field. Let $\pi : C \to Spec(k)$ be a smooth curve (i.e. a separated, smooth morphism of finite presentation and relative dimension $1$) I am trying to understand a few assertions about what an effective Cartier divisor on $C$ looks like that I read in Katz-Mazur's book Arithmetic of elliptic curves (freely available here : https://web.math.princeton.edu/~nmk/katz-mazur.djvu)
Here are a few assertions that I am having trouble to understand :
1) Any section $\sigma : Spec(k) \to C$ of $\pi$ defines an effective cartier divisor (a section of a separated morphism is a closed immersion). That would algebraically translate, if i'm not mistaken, to the fact that if $A$ is a dimension one, regular finite type algebra over $k$, and $\mathfrak{m}$ is a maximal ideal that is the kernel of a morphism $A \to k$ then $m$ is a locally free $A$-module of rank one.
2)If $D \subset C$ is a closed subscheme that is finite over $Spec(k)$ then $D$ is an effective cartier divisor. Using the same notation as before if would translate as : if $I$ is an ideal of $A$ such that $A/I$ is a finite dimensional $k$-vector space then $I$ is locally free of rank one.
3)An effective Cartier divisor in $C$ is a finite $k$-scheme : if $I$ is a locally free $A$-ideal of rank $1$ then $A/I$ is a finite dimensional vector space.
So basically I think if we put it all together it comes down to the following statement :
Let $k$ be an algebraically closed field, $A$ be regular $k$ algebra of finite type and dimension $1$ and $I$ be an ideal of $A$. Then $I$ is invertible (i.e. locally free of rank $1$) if and only if $A/I$ is a finite dimensional $k$ vector space.
Is this true ? And if yes why ?
 A: Yes, your final statement is true.
This is because if moreover $A$ is a domain then it is a Dedekind ring: actually every non-zero ideal $0\subsetneq I\subset A$ is invertible, since by the fundamental result on Dedekind rings we can write $I=\mathfrak m_1^{a_1}\dots \mathfrak m_r^{a_r} $, where the $ \mathfrak m_i$'s are maximal ideals, necessary invertible with $A/\mathfrak m_i=k$,  and $a_i\gt0$.
Notice that Dedekindness follows from the regularity hypothesis, which is equivalent to all localizations $A_\mathfrak m$ being discrete valuation rings.  
EDIT
If the ring $A$ satisfies your hypotheses but is not a domain it can be written canonically as a product $A=A_1\dots \times A_s$ where the $A_i$'s are Dedekind domains to which the above applies.
More precisely every ideal $I\subset A$ is a product of ideals  $I=I_1\times \dots\times I_s \quad (I_i\subset A_i)$ and that product is invertible if and only if all $I_i$'s are non zero, which is equivalent to $A/I$ (or all $A_i/I_i$'s) being finite-dimensional over $k$.
The geometric picture is blindingly clear: the scheme $$\operatorname {Spec}(A)=\coprod _{i=1}^s\operatorname {Spec}(A_i) $$ is the disjoint union of its irreducible components, which coincide with its connected components, and of course a sheaf is invertible on $\operatorname {Spec}(A)$ if and only if its restrictions to these components $\operatorname {Spec}(A_i)$ are all invertible.
