Given a semigroup $S$ with possibly infinite elements , it is known that there is an element $a$ such that its left semigroup action on all other elements $x \in S$ either fixes it or map to a distinct element i.e. $ax=x$ or $ax=b$ where $b \in S$ and $b \neq x$. It is also known that a left inverse exists for $a$, thus $a$ is injective, and it is also known that if $ax=b$, then no two different $ax$ will map to the same $b$. How can I show it is surjective and hence the semigroup action $a$ and its inverse is bijective over $S$ and hence a permutation. Is there actually enough information here to show surjectivity of $a$ and hence $a$ must be bijective hence a permutation?
Specific context:
Given a function $f: \mathbb{R}\rightarrow \mathbb{R}$ on the reals $\mathbb{R}$ such that $\forall x\in \mathbb{R}, f(x)$ either fixes $x$ or maps to $y \neq x$ (which no two $x$ will be mapped by $f$ to the same $y$). This function also have a left inverse $g$ thus $f$ is injective. Is there enough information here to show that it is surjective, hence bijective and a permutation?