In terms of density, the ice floats because it is less dense than water.
The rock would sink because its density is more than water.
When the ice floats, part of it is still above water, but the part below displaces an amount of water equal to the weight of the ice. This volume of water displaced will be less than that of the ice, since water is denser than ice.
If you put the rock on the ice, the combined mass of rock and ice divided by the combined volume of rock and ice has a density still less than water, so it floats.
But it floats lower into the water because the rock is pushing down on the ice. As it pushes down, the weight of the rock displaces an amount of water equal to its weight, and since the density of the water is less than rock, it will take more volume of water to make up the weight of the rock, which is why the level of the water rises when the rock is on the ice.
When the ice melts, the rock falls into the water, but this time only displaces a volume of water equal to its actual volume, which is much less than what was displaced when it was on the ice. Since it now displaces less volume than when on the rock, the water level falls.
Hope this helps.