Is this an example of a group?

No, you don’t have an identity. There is no single element $e\in G$ such that $e*a=a*e=a$ for all $a\in G$. Suppose that we actually had such an $e$. By hypothesis there is at least one $a\in G$ such that $a\ne e$. But then $e*a=e\ne a$, and $e$ isn’t an identity element after all.

You’ve shown that for each $a\in G$ there is some $x\in G$ such that $x*a=a*x=a$, namely $x=a$, but this isn’t what it means to have an identity. For that you need a single element, $e$, that works for all $a\in G$. In logical notation, you’ve proved that

$$\forall a\in G\exists e\in G(a*e=e*a=a)\;,\tag{1}$$

but the statement that $e$ is a group identity is

$$\exists e\in G\forall a\in G(a*e=e*a=a)\;,\tag{2}$$

with the quantifiers in the opposite order. In $(1)$ the $a$ is specified first, and you get to pick a different $e$ for each $a$. In $(2)$ the $e$ must be specified first, and then it has to work for all choices of $a$.

And of course if you have no identity, it’s meaningless to ask for inverses.


$ab=a$, and $ba=b$. Which of these two is the identity?

(If there is only one element, then this is indeed a group, and then $a=b$ in the situation above and there's no conflict.)