Let $R$ be a ring with $1$, $M$ a right $R$-module, and $f:M \to R$ a homomorphism of $R$-modules with $f(M)=R$. Then there is a decomposition $M=K \oplus L$ such that $f \vert_L:L\to R$ is an isomorphism.
Current proof. We'll take $K=\ker f$. By the 1st isomorphism theorem, $M/\ker f\cong f(M)=R$, so my guess is $L= M/\ker f$. This seems like a bad choice since $M / \ker f$ isn't a subset of $M$. If I define $D=\lbrace x\in M: x+\ker f\in M/\ker f\rbrace$, then I simply get $D=M$ which is not good. How can I choose $L$?
If I let $L$ be some subset of $M$ isomorphic to $M/ \ker$ (is there a standard choice for such an $L$?), how can I show that the intersection of $L$ and $K$ is trivial?
The following is primarily first principles. It is not the most elegant way to answer the question if you have knowledge of short exact sequences, etc., but it seems to be more what you are looking for.
Choose any $m\in f^{-1}(1)$. Then Let $L=Rm$. Let's verify that $M=\ker f \oplus L$.
1) If $f(rm)=0$, then $0=rf(m)=r1=r$, so $rm=0$, i.e. $\ker f \cap L=0$.
2) If $\pi :M/\ker f\to R$ is the induced isomorphism and $x\in M$, then \begin{align*} \pi(f(x)m+\ker f)&=f(x)\pi(m+\ker f)\\&=f(x)f(m)\\&=f(x)1\\&=f(x)\end{align*}
But we also know that $\pi(x+\ker f)=f(x)$ and since $\pi$ is an isomorphism, we must have that $f(x)m+\ker f=x+\ker f$, so $x=f(x)m+y$ for some $y\in \ker f$, or $x\in Rm+\ker f$. Thus, $M\subseteq Rm+\ker f$.