I know that the factorization of a nontrivial ideal into prime ideals is unique in a Dedekind domain. Not all UFDs are Dedekind domains, so there must be a UFD in which there exists a nonzero ideal with non-unique factorization into prime ideals.
In non-Dedekind UFD $\mathbb{Z}[x]$, the ideal $(2, x)$ is not principal, but it has unique factorization. So this attempt fails.
Would you please provide an example of a UFD in which the unique factorization of a nonzero ideal into prime ideals is not possible?