Edit, 7/3/24: Apparently my use of the notation $R \oplus \mathbb{Z}$ has been causing confusion, so to be clear: this notation only names the underlying abelian group. The multiplication is the unique multiplication restricting to the original multiplication on $R$ and making $1 \in \mathbb{Z}$ the new unit; this is the Dorroh extension, which is not a name I knew in 2013.
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."