In my lecture notes, I found the following proposition. I believe that it is incorrect.
Proposition (Nakayama for Local Rings). Let $(R, \mathfrak{m})$ be a commutative local ring with residue field $\mathcal{K} = R/\mathfrak{m}$, and let $p: M \to M/\mathfrak{m}M$ be the canonical projection. Then $\{p(x_1), \ldots, p(x_n)\}$ is a basis of the $\mathcal{K}$-vector space $M/\mathfrak{m}M$ if and only if $\{x_1, \ldots, x_n\}$ is a minimal set of generators for $M$.
Indeed, let $(R, \mathfrak{m})$ be a local ring such that $\mathfrak{m} \neq \{0\}$. Let $a \in \mathfrak{m} \setminus \{0\}$. Take $M = R$ and $x_1 = 1, x_2 = 1 + a$. Then $\{x_1, x_2\}$ is clearly not a minimal generating set for $M$. However, $\{p(x_1), p(x_2)\} = \{1, 1\} = \{1\}$ is a basis for $M/\mathfrak{m}M = R/\mathfrak{m}$.
Is my counterexample correct? If so, how can the claim be salvaged?