I'd just like to point out the "natural unital" example in the comments can be broadened to a natural nonunital example. It uses the fact that the ring of transformations is von Neumann regular.
Let $V$ be a vector space of dimension $\aleph_1$. It's known the ideals of the full ring of linear transformations $R$ are linearly ordered and are exactly
- The two trivial ideals
- The subset of transformations with images dimension $<\aleph_0$ (Call it $I_1$.)
- The subset of transformations with images dimension $<\aleph_1$ (Call it $I_2$.)
Another lemma:
If $C$ is a (possibly nonunital) von Neumann regular ring, and $B$ is an ideal of $C$ also considered as a (possibly nonunital) ring. Then if $A\lhd B$, it is also true that $B\lhd C$. That is, the ideals of $B$ are ideals of $C$.
Using this, we can say that $I_2$ is a rng contained in $R$ whose ideals must also be ideals of $R$, but that leaves only the zero ideal and $I_1$.
$I_2$ cannot have an identity, because such an identity would have to have to be a transformation with image having dimension at least as large as the dimension of $I_1$, but it is easy to see that the dimension of $I_1$ is $\aleph_1$. This is a problem since $I_2$ only contains transformations with image dimension $<$ $\aleph_1$.