Rinse off the sugar - leaving it on can be extremely abrasive to the delicate tissues of the intestine and can actually make the prolapse worse (I've seen this in animals customers have brought in after being similarly confused). The sugar should not be left to dry on the prolapse; if it does not improve before the sugar paste dries, just rinse it off, as it is unlikely to help much more. Remember that the prolapse is the very delicate tissues of the animal's intestines...you want to make sure it's being treated as gently as possible.

Soaks in lukewarm water and gently trying to massage it back in can help. Keep it on very damp paper towels so that the intestines do not get too dry and scab again - you want to keep the tissue nice and soft and pink so it can easily go back in on its own.

Good luck, and as others have mentioned, you'll probably want to skip feeding it for a week or two to hopefully ensure it doesn't need to poop more and possibly make the prolapse worse. If the prolapse does get better, small meals would be a good idea for a while to help ensure that the snake does not have overly large bowel movements to pass.

-Jen