Dehydration can cause cloacal prolapse, but so can many other primary morbidities. The cause of the dehydration and weight loss may explain the prolapse too.
Prolapses are considered a medical emergency. No first hand experience on this, but vet/zookeeper recommendations I've read involve mixing up powdered sugar and water 50/50, applying that to the cloaca to reduce the swelling, and wrapping it to keep it moist. If it dries out and becomes necrotic, that's fatal.
Not relevant since the vet can advise tomorrow (or today if you have access to a 24/7 emergency vet), but simple dehydration in snakes should be pretty simple to address with fluids and a stomach tube. That's of course dependent on the reason for the dehydration -- if it is something like an intestinal blockage causing the snake to cease taking in anything orally, then forcing anything down wouldn't necessarily be advisable.