Your example looks correct.
An easier example (at least notationally) seems to be: Let $R = \mathbb{Z}_3 \oplus \mathbb{Z}_3$. We see that $S = \{(0, 0), (1, 1), (2, 2)\}$ is a subring isomorphic to $\mathbb{Z}_3$, but $(1, 2)*(1, 1) = (1, 2)$, which is not an element of $S$, so it cannot be an ideal.
A much easier example (allowing the ring to be infinite): Try the ring (really a field) $\mathbb{Q}$ and the integers $\mathbb{Z}$. Clearly $\mathbb{Z}$ is a subring of $\mathbb{Q}$, but it is not an ideal of $\mathbb{Q}$ (which has only two ideals, $0$ and itself).
Of course I overlooked the simplest example: Let $R = \mathbb{Z}_2 \oplus \mathbb{Z}_2$ and take $S = \{(0, 0), (1, 1)\}$. Then $S$ is clearly a ring (as in the first example), while $(1, 0)*(1, 1) = (1, 0) \notin S$. This is your example is in the original post, just in a much easier to recognize form.
The hint by Orat is correct .You need the fact that There is a homomorphism from $\mathbb{Z}$ into $R$ uniquely determined (or recursively defined by $(n+1)1 =n1 +1 (1 =1_R )$ the identity of $R$ ) . $S = \{n1 |n \in \mathbb{Z} \}$ is a sub-ring hence an ideal , Why is $S = R$
If $h(n) =n1$ , the set $K= h^{-1}(\{0\})$ is an ideal in $\mathbb{Z}$ (the kernel of $h$) .what are the ideals of $\mathbb{Z}$?
(Answer : $(x) = \{nx |n \in \mathbb{Z}\}$, ($x =0,1,2,3,4 ...$) so $h$ induces an isomorphism of $\mathbb{Z}$/$(x)$ with $S = R$ .
By the way you should for completeness also show that every every sub-ring of $\mathbb{Z}$ is an ideal (and the same for sub-rings of $\mathbb{Z}$/$(x)$ )
Stuart M.N.
Best Answer
Hint: Consider the situation when $R$ is a finite field.
Subhint: