In the current mainstream view of set theory (Zermelo-Fraenkel set theory),
the only objects that we can talk about (quantify over) are sets. Informally, a class is a family (collection?) of sets that is defined by a formula $\phi(x,y_1,\dots,y_n)$
with sets $b_1,\dots,b_n$ as parameters. In this case we would denote the class by
$\{a:\phi(a,b_1,\dots,b_n)\}$.

Simple example: Let $b$ be a set and consider the class $\{a:b\in a\}$,
the class of all sets that contain $b$. Here $\phi(x,y)$ is $y\in x$ and the parameter
is $b$.

Now, while it can happen that a certain class is a ring (with the addition and multiplication
also being classes), we have no way of speaking about all such classes (in the language of set theory), since we cannot quantify over the formulas of our language within in the language.

Given a fixed formula $\phi(x,y_1,\dots,y_n)$, we can talk about all classes of the form $\{a:\phi(a,b_1,\dots,b_n)\}$ with $b_1,\dots,b_n$ sets by quantifying over the parameters $b_1,\dots,b_n$, but we cannot talk about all rings that are classes, since they will
not all have a uniform representation as a class in this sense.

This is the main problem. I believe that all statements about rings that concern the internal arithmetic laws of the ring still go through for rings that are classes,
but you get problems with properties that require speaking about the relation of the ring in question to other rings (universal properties etc, but also subrings and ideals as mentioned by Martin Brandenburg in a comment.).