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?