Need a counterexample: If the induced homomorphism $M/\mathfrak aM \to N/\mathfrak aN$ is surjective, then $f$ it's surjective.

This problem is from Atiyah and Macdonald, Introduction to Commutative Algebra, Exercise 10, Chapter 2.

Let $A$ be a commutative ring with $1 \ne 0$ and let $\mathfrak a$ be an ideal of $A$ contained in the Jacobson radical. Let $M$ be an $A$-module and $N$ a finitely generated $A$-module and let $f: M\to N$ be a homomorphism. If the induced homomorphism $M/\mathfrak aM \to N/\mathfrak aN$ is surjective, then $f$ it's surjective.

I've solved this problem but I'm interested in knowing that is the statement true if we drop the assumption that $N$ is finitely generated? I think this is not true but I'm unable in constructing a counterexample. Any ideas?

Take $A = M = \mathbb{Z}_{(p)}$, localized at a prime $p$, and $N = \mathbb{Q}$. Take $f: M \to N$ to be the inclusion $\mathbb{Z}_{(p)} \hookrightarrow \mathbb{Q}$. Take the ideal $\mathfrak{a}$ to be the maximal ideal of $A$.
In fact take any local integral domain $A$ and take $N$ to be its field of fractions.
Incidentally (amusing) together with your result from Atiyah and Macdonald, this shows that $\mathbb{Q}$ is not a f.g. $\mathbb{Z}_{(p)}$-module.
• @ArpitKansal: $\mathbb{Z}_{(p)}$ is the subset of $\mathbb{Q}$ consisting of elements $a/b \in \mathbb{Q}$ such that $b \neq 0$ and $p$ does not divide $b$. You can check that this is a local ring, with the maximal ideal equal to the set of all $a/b \in \mathbb{Q}$ with $p$ dividing $a$. – user83310 Sep 1 '15 at 2:50