Looking at $\mathbb{Z}_{10}$, consisting of $0, 1, 2, 3, 4, 5, 6, 7, 8, 9$ with addition and multiplication adjusted so the ring is closed under both operations.
Clearly $5 = 3 \times 5 = 5 \times 5 = 5 \times 7 = 5 \times 5 \times 5 = \ldots$. It's a little weird that $5$ is its own square and cube, but so it is.
As I was taught here a few weeks ago, this domain is Noetherian, which means that ideals can be factorized finitely and uniquely.
Then $\langle 5 \rangle$ is not a prime ideal but can be factorized as a product of prime ideals. One factor might be $\langle 3, 5, 7 \rangle$, but since $3 = -7$, then $\langle 3, 5 \rangle$ will do. And then $\langle 3, 5 \rangle \langle 3, 5 \rangle = \langle 9, 5 \rangle$, but $9 = -1$, which therefore means $\langle 5 \rangle = \langle 3, 5 \rangle^2$.
Is this right? Or did I go wrong somewhere?
Notherian isn't enough for unique factorization of ideals, you need a Dedekind domain for that, which $\Bbb Z_{10}$ is not. In this case, for example, $(5)$ is a prime ideal because $\Bbb Z_{10}/(5)\cong\Bbb Z_5$, and in fact you can get this from the basic ring isomorphism theorems:
Since $(5)\supseteq (10)$ is a prime ideal of $\Bbb Z$.