Let $X$ be a topological space. Let $Op(X)$ be the category of open sets. A sheaf of abelian groups is a (contravariant) functor $F:\mathcal{C} \to Ab$ satisfying the sheaf condition: the following sequence is exact $ 0 \to F(U)\to \prod_i F(U_i) \to \prod_{i,j} F(U_{ij})$ in the category of abelian groups.
Now, one can replace "category of abelian groups" by any abelian category $\mathcal{A}$ (or category where exact sequences make sense) to get the definition of a sheaf with values in $\mathcal{A}$.
But the category of rings is not abelian and exact sequences don't really make sense (since ideals aren't rings in my opinion).
So does one define a sheaf of rings to be a presheaf of rings which is a sheaf of abelian groups? (So you only ask the sequence to be exact in the category of abelian groups.)