Prolapse do happen at times whether it is an anal prolapse or hemipinal prolapse, obviously different prolapses different causes.Is this bad that I just got him and this happened? Do we think since it went away and not visible anymore he is ok?
From your description it sounds like an anal prolapse which can be related to the size of the prey item or issue with a bowel movement or urate which caused the rectum to pop out.
In most cases this is a one time thing however there are animals prone to prolapse that may require surgery so it is something to keep an eye on.
And as you already know keeping the area moist is very important should this happen again.
Having hemmoroidal cream is also something you might want to add to your snake first aid kit as well.