Can a binary operation have an identity element when it is not associative and commutative? I tried getting the answers in similar questions, everyone says that it's not necessary, but if $e$ is the identity element for any binary operation $*$, which is not associative and commutative, how can
$$a*e=a=e*a$$
when it is not commutative, i.e. $a*b \ne b*a$?
Even if we get a value by solving $a*e=a$. Will we get the same value by solving
$e*a=a$ ?
Please provide an example.

An operation is commutative if for any $a$ and $b$, we have $ab=ba$. Finding one pair $a,b$ such that $ab=ba$ doesn't prove the operation is commutative; this has to hold for every pair. 
Consider the set $\{a,b,c\}$ whose binary operation $\cdot$ is given by the following:
$$a\cdot a = a\,\,\,\,\,\,\,\,\,\,\, a\cdot b=b\,\,\,\,\,\,\,\,\,\,\,a\cdot c=c$$
$$b\cdot a = b\,\,\,\,\,\,\,\,\,\,\, b\cdot b=b\,\,\,\,\,\,\,\,\,\,\,b\cdot c=c$$
$$c\cdot a = c\,\,\,\,\,\,\,\,\,\,\, c\cdot b=b\,\,\,\,\,\,\,\,\,\,\,c\cdot c=a$$
This operation has $a$ as an identity element. However, it is not commutative (since $b\cdot c\neq c\cdot b$) and it is not associative (since $b\cdot(c\cdot c)=b\neq a =(b\cdot c)\cdot c$). 
