Measuring volume change from change in mass
You can't compute the volume of a solid from the mass alone.

You can measure the specific gravity as a function of the temperature of the liquid. You'd need to know how the density of the liquid changes with temperature to convert the specific gravity data at each temperature to actual density value which could then be used to calculate the effective volume of the solid at each temperate.