Suppose $M$ is a set with an associative binary operator $+$ such that for all $m \in M$ there is a unique $n$ such that $m+n+m = m$ and $n+m+n = n$ (thinking of $z_r=m+n$ we get $z_r + m = m$ and $n+z_r = n$; thinking of $z_l =n+m$ we get $m+z_l = m$ and $z_l+n=n$), then you have a well studied object called an “inverse semigroup”.
The set $Z$ you want is called the set of idempotents, $Z = \{ m \in M : m + m = m \}$. It also consists exactly of all $m + (-m)$ for $m \in M$. I also call them "partial identities", because:
There is a partial order $\leq$ on every inverse semigroup: $x \leq y$ iff $x = x + (-x) + y$. This let's you express how close to an identity each $z \in Z$ is: $z + x = x$ whenever $x \leq z$.
For every partial identity $z=g+(-g)$ there is an honest to goodness group called the $H$-class (or more accurately its Schutzenberger group) associated to $z$ consisting of all invertible $z+m+z$ for $m \in M$.
Inverse semigroups as semigroups of bijections
Every inverse semigroup is isomorphic to a semigroup consisting of bijections between subsets of a set $X$, where multiplication is the best version of composition you can manage: if $f:A\to B$ and $g:C \to D$ then $f\cdot g$ takes $f^{-1}(x)$ to $g(x)$ whenever $x \in B \cap C$.
In terms of bijections, the set $Z$ consists of all identity bijections $f:A \to A :a \mapsto a$ where $A$ is the domain of some $m \in M$. In terms of bijections, $-g$ is the inverse function $g^{-1} : D \to C : g(c) \mapsto c$. The partial identities $g+( -g)$ and $-g+g$ are the identity bijections on the domain and range of $g$.
The natural partial order is actually just “subset” if you consider a bijection to be a set of ordered pairs $(a,f(a))$, so that $f \leq g$ if and only if $f$ is the restriction of $g$ to the domain of $f$.
The H-class of an idempotent $f:A\to A:a\mapsto a$ is all the permutations of $A$, that is, bijections from $A$ to $A$.
Bibliography
I recommend both of these books as very clear and motivated introductions to these structures. Lawson's book is particularly readable and draws connections to topology, symmetry, groupoids, category theory, and computer science.
- Lawson, Mark V. Inverse semigroups: The theory of partial symmetries. World Scientific Publishing Co., Inc., River Edge, NJ, 1998. xiv+411 pp. ISBN: 981-02-3316-7 MR1694900 DOI10.1142/9789812816689
- Petrich, Mario. Inverse semigroups. Pure and Applied Mathematics (New York). A Wiley-Interscience Publication. John Wiley & Sons, Inc., New York, 1984. x+674 pp. ISBN: 0-471-87545-7 MR752899