When we measure the spin angular momentum of a particle in an axis different to its current spin, we change the direction of its spin, which taken by itself would be a violation of the law of conservation of angular momentum. Is there some mechanism that compensates for the change? Does it have anything to do with what is used to measure the spin?
Remember that, even before quantum mechanics, conservation laws apply only to closed systems.
When a "quantum measurement" is performed, the previously-closed system becomes an open system, as it is now in the process of interacting with another, outside system: the agent that is trying to acquire information from the previously-closed system. Hence, there is no basis to claim a contradiction to the conservation of angular momentum based on this observation alone.
Do quantum measurements violate conservation laws?
The theory of quantum mechanics that is used to model and predict the results of experiments at the level of particle and nuclear physics, is based on the four vectors of Lorentz transformations and is by construction conserving momentum, and it can be shown that angular momentum is also conserved.
When we measure the spin angular momentum of a particle in an axis different to its current spin, we change the direction of its spin,
Suppose we do. How do you imagine the experiment? In order to change spin direction one needs an interaction , and an interaction means at the quantum level of spins, four vector exchanges with the means of measuring, and those exchanges will keep all the conservation laws.
Actually , you have to keep in mind that the concept of intrinsic spin of particles was "invented" in order to keep angular momentum conservation at the quantum level interactions of elementary particles.