Yes, what you've written is correct. The way to check this sheaf, each local section of which is a ring, assmebles into a "sheaf of rings" is to check that the restriction maps are ring homomorphisms.
There's a second way to see this, which might be faster once you gain some familiarity with the internal logic of the topos of sheaves on $X$. In the interest of making this answer more useful than "yes", I'll also talk about this logical point of view.
First, let's look at the proof that for a abelian group $A$ (as an ordinary set), the set $\text{Hom}(A,A)$ is a ring:
We define operations
- $f+g = x \mapsto f(x) + g(x)$
- $-f = x \mapsto -f(x)$
- $0 = x \mapsto 0$
- $fg = x \mapsto f(g(x))$
Then check that these satisfy the ring axioms. The only interesting thing to check is distributivity, and indeed:
$$(f(g+h))(x) = f((g+h)(x)) = f(g(x) + h(x)) \overset{\star}{=} f(g(x)) + f(h(x)) = (fg)(x) + (fh)(x)$$
in step $\star$ we use the fact that $f$ is a homomorphism, and since this works for all $x$, we conclude that $f(g+h) = fg + fh$.
Now I know that we didn't go through the whole proof together, but it should be believable that our reasoning was constructive the whole time. That is, at no point did we use the axiom of choice, and at no point did we use excluded middle (such as a proof by contradiction). Instead, we just made some definitions, and checked that the definitions worked.
(If you know some things about constructive math, you may be worried about our use of "since this works for all $x$" to show two functions are equal. In this case, this arguing is completely ok since it works equally well on generalized points. If you don't yet know what this means, feel free to ignore it for now.)
Now we use an important fact about sheaves: There's an interpretation of "ordinary" mathematical reasoning (as long as it's constructive!) which lets us pretend that sheaves are ordinary sets! And the translation from ordinary set to sheaf is completely mechanical. What's important for us is that an internal "set" is an abelian group exactly when the sheaf is a sheaf of abelian groups! This is true for rings as well.
So then our constructive proof that (as a set) $\text{Hom}(A,A)$ is a ring externalizes to a proof that (as a sheaf) $\mathcal{Hom}(\mathcal{A},\mathcal{A})$ is a sheaf of rings! Here $\mathcal{A}$ is a sheaf of abelian groups, and $\mathcal{Hom}(-,-)$ is the same sheaf hom that you're using.
You can read more about how to translate facts about sets into facts about sheaves in, for instance, chapter VI.7 of Mac Lane and Moerdijk's Sheaves in Geometry and Logic.
This may feel longer right now (especially because I wrote out a lot of details), but eventually you become sensitive to what proofs are and aren't constructive. Then you ask "Is $\mathcal{End}(\mathcal{A})$ a sheaf of rings?" and your brain says "Well, the usual proof that $\text{End}(A)$ is a ring is constructive. So yes!" which really is quite fast!
I hope this helps ^_^