Two-sided ideals don't count as an example
Every nonunital ring $R$ is a two-sided ideal in its "unitization" $R \oplus \mathbb{Z}$ (with an appropriately defined multiplication). Unitization is the left adjoint to the forgetful functor from rings to nonunital rings. More generally, if $R$ is a $k$-algebra, there is a unitization $R \oplus k$ as a $k$-algebra. This is a common construction in, for example, the study of C*-algebras (where many naturally-occurring C*-algebras such as the algebra of compact operators or group C*-algebras of some locally compact groups are nonunital); it is an algebraic analogue of passing to the one-point compactification (the analogy is via Gelfand-Naimark).
The theory of C*-algebras in particular shows that it's profitable to prove theorems about nonunital rings because you can then apply those theorems to two-sided ideals.
I wrote down some examples and comments in this blog post, which in particular shows that the category of non-unital rings is equivalent to the category of augmented rings (rings together with a morphism $R \to \mathbb{Z}$), and this is a natural category to study; on the geometric side, augmented commutative rings are the rings of functions on "pointed affine schemes."