How do we glue splittings together? Let $M$ be a finitely-generated module over a Dedekind domain $R$. I need to show that $M = M_1 \oplus M_2$ where $M_1$ is torsion and $M_2$ is projective.
It's clear we can do this locally: indeed, for any $\mathfrak{p} \in \operatorname{Spec} R$, $M_\mathfrak{p}$ is a finitely-generated module over a DVR (a fortiori, a PID) $R_\mathfrak{p}$, so splits as a direct sum of a torsion module and a free module. Globally, there is a canonical choice for $M_1$: simply set it to be the torsion submodule of $M$. Then we find that $M/M_1$ is locally free, hence projective. Thus we have a short exact sequence
$$0 \to M_1 \to M \to M / M_1 \to 0$$
with $M_1$ torsion and $M/M_1$ projective. So far so good. It suffices now to find a map $M/M_1 \to M$ splitting the sequence above; but we know that the localised sequence
$$0 \to (M_1)_\mathfrak{p} \to M_\mathfrak{p} \to M_\mathfrak{p} / (M_1)_\mathfrak{p} \to 0$$
is split, and since every module in sight is finitely-presented, there is a $a \in R$ so that tensoring the original sequence with $R[a^{-1}]$ yields a split sequence.
Question. Is there a way for me to choose the local splittings coherently so that I can collate the maps to get a global splitting of $M$? (I'm thinking of $M$ as a coherent sheaf over $\operatorname{Spec} R$.) Or do I need to take a different approach to prove the claim?
 A: You have the diagram
$$\begin{align*}
  & P  \\
  & \downarrow \\
M  \stackrel{f}\twoheadrightarrow & P 
\end{align*}$$
where $P$ is projective, and the vertical map is the identity.  The definition of projectivity gives a map $g:P \to M$ such that $fg=\operatorname{id}$, splitting the surjection $f$. 
A: A sheaf style proof. 
Let $\mathcal F\to\mathcal G$ be a surjective morphism of coherent sheaves on a scheme $X$. Suppose that $\mathcal G$ is locally free. The canonical map
$$ \mathcal{H}om(\mathcal G, \mathcal F)\to \mathcal{H}om(\mathcal G, \mathcal G)$$ 
of coherent sheaves is surjective (because of the local splitting property). Now suppose $X$ is affine, then the canonical map on the global sections on $X$ 
$$ \mathrm{Hom}(\mathcal G, \mathcal F)\to \mathrm{Hom}(\mathcal G, \mathcal G)$$ 
is surjective. Again because $X$ is affine, 
$$ \mathrm{Hom}(\mathcal G, \mathcal F)=\mathrm{Hom}(\mathcal G(X), \mathcal F(X)), \quad \mathrm{Hom}(\mathcal G, \mathcal G)=\mathrm{Hom}(\mathcal G(X), \mathcal G(X)).$$
Then you can conclude easily.
