Difference between lattice energy and thermal stability
1) Lattice energy is the measure of the stability of an ionic solid. 

It is the energy required to separate the ions in one mole of a solid ionic compound into gaseous ions.

The weaker the bond between the ions, the easier it will be to break that bond and separate the ions into gaseous ions and the lesser will be the lattice energy.

Therefore, the stronger the bond between the ions, the more is the lattice energy of the ionic compound.

2 )Thermal stability depends upon the amount of heat required to break the ionic compound. Clearly, the stronger the bond between the ions is, the more heat will be required to break the bond and as a result, the thermal stability of the compound increases. 

Therefore, stronger the bond, more is the thermal stability of the ionic solid.

In general, we can say that as thermal stability increases, the lattice energy also increases, but they also also depend upon the crystal structure of the solid and other factors. 

So, you cannot say with certainty that if the thermal stability is high, then lattice energy will be high too. 

Hence, the answer is no. If MX has a higher thermal stability than MY, then it may or may not have higher lattice energy than MY.