Do non-trivial kernels of maps between free modules always contain a basis element? Let $R$ be a commutative ring with identity and $f: R^m \rightarrow R^n$ a homomorphism of $R$-modules with $m>n$. Then does there exist a basis $x_1,\cdots , x_m$ of $R^m$ such that $f(x_1)=0$?
What if we further assume that $R$ is local? In the non-local case, a special question would be if $M\subset R^{t+d}$ is a stably free module of type $t$ and rank $d>1$, must $M$ contain a basis element of $R^{t+d}$?
 A: Let $R = k[x, y]$ for $k$ a field, let $m = 2, n = 1$, and let $f : R^2 \to R$ be given by
$$f(a, b) = xa + by \in R.$$
Then $\text{ker}(f)$ is generated by $(-y, x)$ which cannot be an element of any basis, nor can any multiple of it, because it's contained in the image of a nontrivial ideal $m = (x, y)$ of $R$. This counterexample continues to work after localizing at $m$, so it doesn't help to assume that $R$ is local.
Here's a sketch: a vector $v_1 \in R^n$ is an element of a basis iff it's the first column of a matrix in $GL_n(R)$, hence iff we can find $v_2, \dots v_n \in R^n$ such that the matrix with columns $v_1, \dots v_n$ has invertible determinant. If the entries of $v_1$ are entirely contained in a proper ideal $I \subsetneq R$ then so is this determinant, so it can't be invertible. Equivalently, regarding this determinant as a linear combination of the entries of $v_1$ using the entries of $v_2, \dots v_n$, we see that the existence of such a determinant implies that the entries of $v_1$ generate the unit ideal in $R$.

Edit: In the comments you ask what happens if $f$ is assumed to be surjective and I mentioned that in this case $\text{ker}(f)$ is a stably free module. Here we can use Keith Conrad's example of a stably free module which is not free: let $R = \mathbb{R}[x, y, z]/(x^2 + y^2 + z^2 - 1)$ be the ring of polynomial functions on the 2-sphere $S^2$ and let $f : R^3 \to R$ be given by
$$f(a, b, c) = xa + by + cz \in R.$$
Then $\text{ker}(f)$ is the module of polynomial vector fields on $S^2$. By the hairy ball theorem, any such vector field vanishes at some point $p \in S^2$, so the corresponding maximal ideal $m_p$ can be used as in the above argument to show that no element of $\text{ker}(f)$ can be part of a basis of $R^3$.
