What is the correct notion of unique factorization in a ring? I was recently writing some notes on basic commutative ring theory, and was trying to convince myself why it was a good idea to study integral domains when it comes to unique factorization.
If $R$ is a commutative ring, and $a$ is a zero divisor, we cannot expect $a$ generally to have unique factorization in the ordinary sense, seen for example by the fact that $2*4=2$ in $\mathbb{Z}/6\mathbb{Z}$.
But this only makes me think that instead of focusing on domains, we should just focus on element that aren't zero divisors. Indeed, we can let $R_z$ be the set of elements that aren't zero divisors. Then if $R$ is nontrivial, $R_z$ is a commutative monoid under multiplication that contains the units. Moreover $R_z$ has the nice property that any if $a_1\dots a_n = b$ is some factorization of $b \in R_z$, then all the $a_i$ are in $R_z$.
In this setting, we can say that $R$ having unique factorization means that $R_z/R^\times$ is a free commutative monoid. In the case that $R$ is a domain, this agrees with the definition of a UFD.
Now standard arguments about factorization of nonzero elements in domains seem to work just as well for $R_z$. For example in a Noetherian ring, every element of $R_z$ can be factored into some irreducibles times a unit.
Similarly, the proof seems to go through that principle ideal rings are unique factorization rings (in my sense).
So my questions are:
Is what I'm saying correct? If so, why do we normally restrict to domains when many arguments go through for arbitrary rings with no more effort (as long as we are willing to ignore zero-divisors)? Are there other natural generalizations of unique factorization of elements of a ring for which analogous theorems can be proven without more difficulty?
By looking at this question, I found this and this, which did have examples of generalizations of unique factorization to more general rings. The first one essentially considers a tame type of ring where zero divisors are not so bad in terms of factorization, and my impression of the second one is that it exerts a lot of effort trying to generalize the notion of unique factorization to the extent that it becomes significantly more complicated.
Any suggestions are appreciated.
 A: This is likely more a contribution to what you are looking for than a precise answer to your question. 
As unique factorization properties have little to do with the addition of the ring, let me switch to commutative monoids. Let $H$ be commutative monoid and let $\leq$ be the division preorder, defined by
$$
  a \leqslant b \iff \text{there exists $x \in H$ such that $ax = b$}
$$
Let us assume that $\leqslant$ is actually a partial order. Irreducible and prime elements can now be defined as follows.
Definition 1. An element $x \in H$ is irreducible if, for each finite set $I$ such that $x = \prod_{i \in I}x_i$, there exists $i \in I$ such that $x_i = x$.
Note that $1$ is not irreducible since $1 = \prod_{i \in \emptyset}x_i$. 
Definition 2. An element $x \in H$ is prime if, for each finite set $I$ such that $x \leqslant \prod_{i \in I}x_i$, there exists $i \in I$ such that $x_i \leqslant x$.
In the join semilattice represented below, $1$, $p$, $q$ and $r$ are irreducible; $p$ et $q$ are prime but $r$ is not. All elements are idempotent.
$\hskip 125pt$
Definition 3. A decomposition of an element $x$ is a finite family $D = (x_i)_{i \in I}$ of irreducible elements such that $x = \prod_{i \in I}x_i$. 
Definition 4. Let $D = (x_i)_{i \in I}$ and $D' = (x'_i)_{i \in I'}$ be two decompositions of $x$. Then $D$ is more reduced than $D'$ if there is an injective map $\sigma:I \to I'$ such that, for all $i \in I$, $x_i \leqslant x'_{\sigma(i)}$. 
Here is the main definition.
Definition 5. A monoid $H$ is factorial if, for each element $x \in H$, 
the set of decompositions of $x$ has a minimum element, called the reduced decomposition of $x$.
Here is a nontrivial example, with both an infinite ascending and descending chain. This is again a join semilattice.
The irreducible elements are $a$, $b$, the $x_n$'s and the $y_n$'s. There are only two prime elements: $a$ and $y_1$. Indeed $y_2$, for instance, is not prime since $y_2\leqslant ay_1 = x$ but $y_2 \not\leqslant a$ and $y_2 \not\leqslant y_1$. The reduced decomposition of $x$ is $x = ay_1$. 
$\hskip 100pt$
What can be proved with this notion? The main result is that factorial monoids have lcm's , but not necessarily gcd's. Furthermore, if $H$ is factorial, then $(H, \text{lcm})$ is also factorial.
Reference. This material is from this (French and poorly written) paper.
