Let $M$ be a module over a commutative ring $R$ with unity and $\mathfrak a$ an ideal in $R$. Let $m_1, ..., m_n \in M$ be a generating system for $M$ and $z \in\mathfrak a M$. Then there are $a_1, ..., a_n \in\mathfrak a$ with $a_1 m_1 + \cdots + a_n m_n = z$.
I do not see why this statement is true. We know that there are $r_1, ..., r_n \in R$ with $r_1 m_1 + ... + r_n m_n =z$, but can we find coefficients in $\mathfrak a$ as well?
By definition of $\,\mathfrak a M$, there exist elements $\alpha_1,\dots,\alpha_r\in\mathfrak a$, $\;x_1,\dots,x_r\in M$, such that $$z=\alpha_1x_1+\dots+\alpha_rx_r.$$ Now, each $x_i$ can be written as $\;x_i=\sum_{j=1}^nc_{ij}m_j$, whence \begin{align*}z&=\alpha_1(c_{11}m_1+\dots+c_{1n}m_n)+\dots+\alpha_r(c_{r1}m_1+\dots+c_{rn}m_n)\\ &=(\alpha_1c_{11}m_1+\dots+\alpha_rc_{r1})m_1+\dots+(\alpha_1c_{1n}+\dots+\alpha_rc_{rn})m_n, \end{align*} and each $\;\alpha_1c_{1i}m_1+\dots+\alpha_rc_{ri}\in\mathfrak a $.