Your confusion arises from the fact that you are using the same letter in both equations. It would be better to say that invertibility is the property that for every $m$ there is a solution to the equation $m*x = e$, and a solution to the equation $y*m=e$. You can then prove that the solutions will in fact be the same, since
$$y = y*e = y*(m*x) = (y*m)*x = e*x = x.$$
Moreover, while it is true that the two equations together imply that $mx=xm$, this is not equivalent to commutativity. To be clear, commutativity would be
For all $a$ and all $b$, $ab=ba$.
Here you have only
If $x$ is the solution to $mx=e$, then $mx=xm$.
That is, you are only guaranteed that a particular element commutes with each $m$, not that every element commutes with every element.
Consider the usual "axioms" of a group. the ingredients are a set $S$, and a function $\cdot\colon S\times S\to S$, which we write using infix notation (so we write $a\cdot b$ or $ab$ instead of $\cdot(a,b)$). Then we require:
- Associativity. $\cdot$ is associative: $a(bc) = (ab)c$ for all $a,b,c\in S$.
- Existence of neutral element. There exists an element $e\in S$ such that for all $a\in S$, $ae=ea=a$.
- Existence of inverses. For each $a\in S$ there exists $b\in S$ such that $ab=ba=e$, where $e$ is a neutral element as in 2.
If we relax the requirements that all three conditions get satisfied, we get more general structures (but the more general the structure, the less we can say about them).
- If you drop all three conditions, you get a magma.
- If you drop the second and third condition but keep the first, requiring only that the operation be associative, you get a semigroup.
- If you drop the third condition but keep the first and second, requiring that the operation be associative and that there be a neutral element, you get a monoid.
- If you keep all three conditions, you get a group.
There are other things you can do; it does not make sense to drop the second and keep the third condition.
If you drop the first (associativity), then can relax the conditions a bit and ask that all equations of the form $ax=b$ and $ya=b$ have solutions, but not requiring that the operation be associative. That gives you a quasigroup. If you require that all such equations have solutions and that there be an identity, you get a loop. This is equivalent to asking that conditions 2 and 3 be satisfied, but not condition 1.
Within each category you can put other conditions. There are "cancellation semigroups", which are semigroups in which $ax=ay$ implies $x=y$. There are "inverse semigroups" which, perhaps confusingly, does not mean that condition 3 is satisfied (makes no sense if we don't have condition 2), but rather that for every $a$ there exists a $b$ such that $aba=a$ and $bab=b$. And so on and so forth. Lots of different wrinkles to be seen in there.