It is true in general that $\mathbb Z_n$ is injective as a module over itself, and the argument in the general case is not much different to the particular case $n =
You are right that Baer's criterion is the right way to proceed, but you are wrong
in your application of it.
There is no reason that a homomorphism of modules (or groups) should take generators to generators (think about any inclusion of a proper submodule or subgroup). Indeed, as countinghaus notes in a comment, it is not even possible in your context.
Why don't you think about the structure of $I$ (for example) as a $\mathbb Z_6$-module, and determine what the possible homomorphisms $f$ actually are. Then you should see that it is possible to extend such a homomorphism to $\mathbb Z_6$.
(The point is that $I$ is a cyclic $\mathbb Z_6$-module; it is generated by $3$. But it is not free: $3$ is annihlated by multplication by $2$, so its image in $\mathbb Z_6$ must also be annihilated by $2$. What are the possibilities?)
If you want to understand this problem more deeply, you may want to think about
the general case. There is a certain amount of bookkeeping when thinking about the maps of ideals into $\mathbb Z_n$ and their possible extensions to $n$, which can be easier to keep track of in general by applying the Chinese Remainder Theorem. Indeed, already the CRT can help with the $\mathbb Z_6$ case, but if it isn't clear to you how to use it, you certainly don't need to use it.
Also, you might want to think about the case of $\mathbb Z$ as a module over itself, and why Baer's criterion fails in this case (so that $\mathbb Z$ is not injective as a module over itself).