To be clear, the use of the word "natural" here is informal, not formal. Loosely speaking it means that the definition of the group-of-units functor is a "natural thing to do" to a ring, in that it only uses the ring axioms in a very basic way (namely that multiplication is associative and unital).
It's unfortunate that we also have a formal notion of naturality in category theory which makes it hard to distinguish between the formal and informal uses of the word.
However, in this particular case it is actually possible to upgrade this informal naturality to something formal, as follows. We can actually define rings and groups internal to other categories, more specifically in any category with finite products, by rewriting all of the ring and group axioms in terms of the commutativity of certain diagrams. For example a topological group is a group internal to $\text{Top}$. If $C$ is a category with finite products write $\text{Ring}_C$ for the category of ring objects in $C$ and $\text{Grp}_C$ for the category of group objects in $C$. Then, if we additionally assume that $C$ has equalizers, there is a group-of-units functor
$$U_C: \text{Ring}_C \to \text{Grp}_C$$
sending a ring object $R \in \text{Ring}_C$ to the equalizer of the three maps $R \times R \to R$ given by the multiplication $m$, the reversed multiplication (in the other order), and the constant map $1$ equal to the multiplicative identity on the other (this cuts out the locus $\{ (r, s) \in R^2 : rs = sr = 1 \}$), equipped with a suitable group object structure. This collection of functors is moreover natural in $C$ in the technical, formal sense (in that a suitable square commutes involving $U_C$ and $U_D$ if we have a functor $F : C \to D$ which preserves finite limits), although since $C$ itself is a variable that ranges over categories this all has to be understood in a suitable 2-categorical sense.
This is one way of formalizing the informal idea that we are "only using the ring axioms in a very basic way" when we define the group of units; loosely speaking the existence of the natural (in the technical sense) collection of functors $U_C$ above says that the definition of the group of units only involves the "essential concept of a ring" (that is, the notion of a ring object) and is not sensitive to details like what category we happen to be considering ring objects in.
(Some care needs to be taken here to interpret $U_C$ correctly. Its existence does not imply, for example, that the group of units $R^{\times}$ of a topological ring $R$ is a topological group when equipped with the subspace topology; in general inversion can fail to be continuous. Instead we are topologizing $R^{\times}$ as the $\{ rs = sr = 1 \}$ subspace of $R \times R$. Here inversion is just given by switching the coordinates so it is clearly continuous, which means this topology differs from the subspace topology $R^{\times} \subset R$ in general.)