If $\varphi(I)$ is an Ideal $\forall I $ ideal of $A$, is $\varphi$ surjective? Today I heared some young students talking about the fact that if an homomorphism of rings (commutative with identity) $\varphi:A \rightarrow B$ is surjective then the image of any ideal of $A$ is an ideal of $B$ (not necessarily proper).
Immediately I asked to myself if the converse was true, coming to the conclusion (I hope I didn't miss anyting of obvious) that is not an easy question to answer. In particular I refer to the following assert:

Let $\varphi:A \rightarrow B$ be an homorphism of ring (commutative with identity) such that the image of every ideal $I \neq (1)$ of $A$ (NOT the ideal generated by the image of $I$, I'm precisely talking about $\varphi(I)$) is an ideal of $B$, is this morphism always surjective? 

Is this true? Is this false? Any counterexaple/proof? If this is false, I can add some hypothesis to make it true?
Now, obviousely if we remove the hypothesis of $I \neq (1)$, the assert is true, but I have no idea of what holds in general.
I'm sure that the assert is false if $A$ is a field: let consider for example  the obvious injective homomorphism $i$ from $\mathbb{Q}$ to $\mathbb{R}$, $i(0)$ is exactely the $(0)$ ideal of $\mathbb{R}$ but $i$ is not surjective.
But this is a "strange" case, now I will suppose $A$ has effectively some proper ideal: what about this evenience?
I suppose that if there are some condition about factorization (UFD?) on $A$ the assert is true, but I think I need some help to prove it.
Finally: what about if we remove hypothesis about the rings $A$ and $B$? But this final question is on the perverse paths of non commutative and non unital algebra: I'm scared of what kind of monstrous creatures I can  unleash...
Edit:  PavelC have shown a counterexample if $A$ is local, what about if we assume $A$ is NOT local too? To be more precise, I want an homomorphism such that effectively $\varphi(I)\neq (0)$ for some $I$.
 A: Consider a local ring $(R,\mathfrak{m})$ with residue field $k$ (i.e. $R/\mathfrak{m}=k$) and some non-trivial $k$-algebra, say $k[X]$. Then the ring homomorphism
$$\pi_\mathfrak{m}: R \rightarrow k[X],\;\; r \mapsto r+\mathfrak{m} \in k$$
is certainly not surjective, but every non-trivial ideal of $R$ is mapped to the zero ideal of $k[X]$.
So the claim does not hold.
Also note that $R$ can be really well-behaved, say UFD (or even PID, i.e. a discrete valuation ring) and, on the other hand, kind of ugly as well (localiyation of ugly enough commutative ring at its prime ideal).
EDIT:
Assume that the ring $R$ is not local and not a field either, i.e. one has two comaximal ideals $I_1, I_2 \subsetneq R, I_1+I_2=R$. Consider a ring homomorphism $\varphi: R \rightarrow S$, with the property zou described, where $S$ is wlog not the zero ring. Then $\varphi(I_1)+\varphi(I_2)$ is an ideal of $S$ (since $\varphi(I_1), \varphi(I_2)$ are), however,
$$\varphi(I_1)+\varphi(I_2)=\varphi(I_1+I_2)=\varphi(R).$$
In particular, $\varphi(I_1)+\varphi(I_2)$ is an ideal of $S$ containing $1$. Thus, $\varphi(R)=S$.
