Let $\cal{C}$ be the category of $\textbf{Rings}$ and let $X$ and $Y$ be two objects in $\cal{C}$.
A coproduct of $X$ and $Y$ in $\cal{C}$ is an object $S$ of $\cal{C}$, together with morphisms $i: X \to S$ and $j: Y \to S$, with the following (universal) property:
for every object $Z$ of $\cal{C}$ and every pair of morphisms $f: X \to Z$ and $g: Y \to Z$, there exists a unique morphism $h: S \to Z$ such that $h\circ i=f$ and $h\circ j=g$.
The first issue is this: Based on the above definition we derive that $(R,\mathrm{id}_R,\mathrm{id}_R)$ is not a coproduct of $R$ and $R$.
Indeed, let $X=Y=R$ and $i=j=\mathrm{id}_R$. Then, if $(R,\mathrm{id}_R,\mathrm{id}_R)$ is not a coproduct of $R$ and $R$, by the universal property of coproduct we have that for every ring $Z$ and every morphisms $f: R \to Z$ and $g: R \to Z$ there exists a morphism $h:R\to Z$ such that $h=f=g$, which is obviously false.
The second issue is based in the following Proposition and states that $(\Bbb Z/n\Bbb Z, \mathrm{id}_{\Bbb Z/n\Bbb Z},\mathrm{id}_{\Bbb Z/n\Bbb Z})$ is a coproduct of $\Bbb Z/n\Bbb Z$ and $\Bbb Z/n\Bbb Z$:
Let $m$ and $n$ be positive integers, and let $d$ be their greatest common divisor. Let $i: \Bbb Z/m\Bbb Z → \Bbb Z/d\Bbb Z$ and $j: \Bbb Z/n\Bbb Z → \Bbb Z/d\Bbb Z$ be the canonical ring homomorphisms. Then $(\Bbb Z/d\Bbb Z, i, j)$ is a coproduct of $\Bbb Z/m\Bbb Z$ and $\Bbb Z/n\Bbb Z$ in the category $\cal{C}$.
Now taking $n=m$ we derive that $(\Bbb Z/n\Bbb Z, \mathrm{id}_{\Bbb Z/n\Bbb Z},\mathrm{id}_{\Bbb Z/n\Bbb Z})$ is a coproduct of $\Bbb Z/n\Bbb Z$ and $\Bbb Z/n\Bbb Z$.
Obviously, these issues contradict themselves. Could someone point out what' s wrong with the above statements?
Why is this "obviously false"? It is indeed false for most rings, and it is not hard to come up with counterexamples. But this doesn't mean it's false for every ring, and $\mathbb{Z}/n\mathbb{Z}$ is a very special ring. Indeed, for any ring $Z$, there is at most one homomorphism $\mathbb{Z}/n\mathbb{Z}\to Z$, so in your situation above with $R=\mathbb{Z}/n\mathbb{Z}$ you must in fact have $f=g$.