Typically, yes.
However, sometimes there are other methods. For instance, the barium hydroxide octahydrate has a melting point of ~78C. It is possible that if you heat it up to make it a liquid the other compound could be soluble in it, and a reaction could then occur (might not be the once you expect) . That is however not the case for this one, it is just another example of ways we make reactions occur.
This is a very common endothermic reaction demonstration. Just mix them in water and it will happen.