Let's consider the canonical example of an inverse semigroup that J.-E. Pin mentioned in his answer, the semigroup of partial bijections on a set. For concreteness, let's take our set to be $[3]=\{1,2,3\}$ and call our resulting semigroup $S$.
Consider the element $f:\{1,2\}\rightarrow\{2,3\}$ defined by $f(1)=2$ and $f(2)=3$. Then $f$ has a unique inverse $f^*:\{2,3\}\rightarrow\{1,3\}$ defined by $f^*(2)=1$ and $f^*(3)=2$. You can easily verify that
$$f\circ f^*\circ f = f,\ \ \ \ \ \text{and}\ \ \ \ f^*\circ f \circ f^* = f^*,$$
and indeed, you can verify that $f^*$ is the unique element of $S$ which satisfy both these conditions. But there are others which satisfy the each of the two above conditions individually. For example, $f^{**}:[3]\rightarrow [3]$ defined by $f^{**}(1)=3$, $f^{**}(2)=1$, and $f^{**}(3)=2$. Then we also have
$$f\circ f^{**} \circ f = f,$$
but we no longer have
$$f^{**} \circ f \circ f^{**} = f^{**}.$$
In fact, $f^{**} \circ f \circ f^{**}$ is the restriction of $f^{**}$ to $\{2,3\}$.
So there is a distinct difference between:
i. A semigroup $S$ such that for every $x\in S$, there exists a unique $y\in S$ such that $xyx=x$.
ii. A semigroup $S$ such that for every $x\in S$, there exists a unique $y\in S$ such that both $xyx=x$ and $yxy=y$.
And the condition ii is strictly weaker than condition i. You can prove that any semigroup which satisfies condition i is a full group. You cannot do the same for condition ii, which defines inverse semigroups. The semigroup of partial bijections is an explicit example of this.