Let $A$ be a set and $\ast$ a binary operator on that set. Let us suppose that $(A,\ast)$ satisfies the following axioms:
- For all $x,y,z \in A$, $x \ast (y \ast z) = (x \ast y) \ast z$
- For all $x,y,z \in A$, if $z = x \ast y$, then $z = x$ or $z = y$
The first property says that the structure is a semigroup and the second says that all elements are irreducible. Moreover, this semigroup is a idempotent.
We can induce a weak order on $A$ by saying $x < y$ if $x \ast y = x$ and $y \ast x = x$. To prove transitivity, just note that $x \ast (y \ast z) = (x \ast y) \ast z$ implies $x \ast z = z$ if $x < y$ and $y < z$. Do the operations in reverse to show $z \ast x = z$.
We can also do the reverse by defining $x \ast y$ as $x$ unless $y < x$. This is not an isomorphism though.
Does this algebraic structure have a name?
I don't know what these are called, but it's worth noting that (unsurprisingly) they have an order-theoretic description as well. Specifically, there is a tight connection between these semigroups and pairs of (partial) preorders satisfying a kind of "antiduality" condition.
Suppose $(A,*)$ is a semigroup of this type. Consider the relation $\trianglelefteq_{right}$ on $A$ defined by $$x\trianglelefteq_{right} y\iff x*y=y$$ (this is a weakening of the relation you define). I claim that this is in fact a partial preorder on $A$ (= reflexive and transitive, but elements don't need to be comparable and perhaps $x\trianglelefteq_{right} y,y\trianglelefteq_{right} x\not\rightarrow x=y$).
For efficiency, I'll refer to partial preorders as just "preorders" for the rest of this answer.
Reflexivity is clear, so we just have to show transitivity.
To see this, let $x*y=y$ and $y*z=z$. Since $x*z\in\{x,z\}$, the only two possibilities are $x*z=z$ - in which case we're done - or $x*z=x$. So suppose $x*z=x$; I'll show that $x=z$ (and so $x*z=z$ as desired). But this is easy: we have $x*(y*z)=x*z=x$ and $(x*y)*z=y*z=z$.
The "dual" relation $$x\trianglelefteq_{left}y\iff y*x=y$$ is similarly a preorder on $A$. However, we also have $$x\trianglelefteq_{left} y\iff (x=y\mbox{ or }y\not\trianglelefteq_{right}x)\quad\mbox{and}\quad x\trianglelefteq_{right} y\iff (x=y\mbox{ or }y\not\trianglelefteq_{left}x).$$ We can now make the following observation:
The only piece of this observation left to prove is that from such a double-preorder we can recover the desired type of semigroup. Given $(A,\preccurlyeq_1,\preccurlyeq_2)$ appropriate, let $$x*y=y\iff x\preccurlyeq_1y, \quad x*y=x\iff y\preccurlyeq_2x.$$ This is clearly well-defined, and it's a bit tedious but not hard to check that it is associative as well. Here's part of the proof:
Suppose that $x\preccurlyeq_1y$ and $y\preccurlyeq_2z$. Then we have $$(x*y)*z=y*z=z\quad\mbox{and}\quad x*(y*z)=x*z.$$ For associativity to fail, we would need to have $x*z=x$ and $x\not=z$, but this would mean $z\preccurlyeq_2x$. Transitivity of $\preccurlyeq_2$ then gives $y\preccurlyeq_2x$, so since $x\preccurlyeq_1y$ we have $x=y$. But then $x*z=y*z=z$, so $x=z$, a contradiction.
Moreover, it's not hard to show that this correspondence is in fact 1-1. So we have our order-theoretic description.