Deciding if a ring $R$ has unique factorization or not is only considered if the ring $R$ has no zero-divisors.
The question is why ?
USUALLY we consider factorization up to units. If - for instance - we consider factorization up to units and zero-divisors we can extend the concept of Unique factorization to rings with zero-divisors.
Also we could consider Unique factorization of group rings ( with or without zero-divisors ).