This question is the continuation Inverse image of ideal under a homomorphism of rings is generated by inverse images of generators.
Let $f:R\to S$ be a homomorphism of rings and let $I\subset S$ be an ideal. I would like to know how $f^{-1}(I)$ looks, resp. how many generators one needs for it. Let us assume that $I\subset f(R)$ so that we can talk about the set $f^{-1}(g_i)$, where $g_1,\dots, g_r$ are generators for $I$.
We can assume that $I=0$ by changing $S$ to $S/I$. Therefore, the problem is to determine the number of generators needed to generate $\ker(f)$ for $f:R\to S$ a homomorphism of rings. Here it seems to be much more clear that $f^{-1}(g_1),\dots,f^{-1}(g_r)$ might not generate all of $\ker(f)$, since $I$ contains only $0$ but the kernel might be large. Moreover, it seems that the condition actually is that $\ker(f)=0$, i.e. $f$ is injective.
So my question is whether it is true that
If $f: R \to S$ is a morphism of rings and $I=(g_1,\dots,g_r)\subset S$ is an ideal with $I\subset f(R),$ then $f^{-1}(I)$ is spanned by $r$ generators iff $f$ is injective. Moreover, in this case $f^{-1}(I)=(f^{-1}(g_1),\dots, f^{-1}(g_r))$.
And I hope that what I wrote provides more or less a proof of this fact. Again, feel free to point at mistakes. Thanks!
I think you already know that if $f$ is injective, you get $f^{-1}(I)$ generated by the $f^{-1}(g_i)$. For the other direction, take for example the map $$f : \mathbb{Z} \to \mathbb{F}_2, x \mapsto x \mod{2}.$$ This map is surely not injective, but still all non-zero ideals in both $\mathbb{Z}$ and $\mathbb{F}_2$ are generated by a single element. You can generalize this counter-example to take any prinicipal ideal ring $R$ and non-trivial ideal $I$ and then considering the canonical map $R \to R/I$.
So in short, no, you won't get an iff here, sorry.