Consider a binary operation & defined by (a&b)=(a-(b+(a*b))) on the integers, with "a" and "b" as integers. One might argue as follows:
By closure (a*b) equals an integer, which we'll call k. Thus, (a-(b+(a*b)))=(a-(b+k). By closure (a+k) equals an integer, which we'll call j. Thus, (a-(b+(a*b)))=(a-(b+k)=(a-j). Since (a-j) means the same thing as (a+i) where i indicates the inverse of j we can write: (a-(b+(a*b)))=(a+i). Thus, (a-(b+(a*b))) or (a&b) consists of an addition of two integers. Addition associates on the integers, meaning that for all x, y, z (x+(y+z))=((x+y)+z). Therefore, & associates on the integers also.
This argument is not valid, since if a=0, b=1, we have
(0&(0&1))=(0&-1)=1 and
((0&0)&1)=(0&1)=(-1).
How does the above argument fail?
The operation $x \star y = x + \sin y$ consists of the addition of real numbers, namely $x$ and $\sin y$, but isn't associative. It has to be the addition of the arguments of the binary operation in order for associativity to be inherited.
You should check associativity, or lack thereof, by direct calculation.