In the following, let "ring" be a synonym for "commutative ring with identity". In the book on Commutative Algebra by Atiyah and MacDonald, I read:
Let $A$ be a local ring, $\mathfrak{m}$ its maximal ideal, $k = A / \mathfrak{m}$ its residue field. Let $M$ be a finitely generated $A$-module. $M / \mathfrak{m}M$ is annihilated by $\mathfrak{m}$, hence is naturally an $A/\mathfrak{m}$-module, i.e. a $k$-vector space, and as such finite-dimensional.
Proposition 2.8: Let $x_i$ $(1 \leq i \leq n)$ be elements of $M$ whose images in $M / \mathfrak{m}M$ form a basis of this vector space. Then the $x_i$ generate $M$.
In the proof, the fact that $A$ is local is not used explicitely. I suspect that this holds for any non-trivial ring $A$ and some maximal ideal $\mathfrak{m}$ of $A$. However, I might overlook something.
Question: Does Proposition 2.8 hold for any non-trivial ring $A$ with maximal ideal $\mathfrak{m}$? If no, why is it important for $A$ to be local?