Consider a binary operation on the finite set $S=\{0,1,2,3,4,5\}$ where the operation is "addition, then modulo 3" ($+_3$). Does $S$ form a group under the binary operation $+_3$?
Now this binary operation follows closure property . It's associative. There exists identity element which is $0$. And for each element of the set $S$ there exists its inverse such that $aa^{-1}=0$.
It follows all requirements to be a group.
But it violates some other properties of group like left and right cancellation laws:
If $ax=ay\implies x=y$ $0+_32=0+_35\implies 2=5$
And equations $a+_3x=b$ and $y+_3a=b$ don't have unique solutions.