from the initial photos it seemed that the snail was changing position, therefore not dead.
Mine exude a milky, stringy substance sometimes. Sometimes I think it's just odd colored poop. But sometimes I've added calcium to the bottom of the tank and then later add water that stirs up the calcium 'sand' and that gets into the inside on their flesh when they close up due to the flurry of the calcium sand. Then they stay closed or semi-closed, like your snail, for a few hours and exude a mucous that is kind of milky.
Maybe the snail got exposed to some kind of grit?
I think your snail will be fine after a few hours.