Ok....rectal prolapse without tearing will not cause the intestines to come out, so either it was out for so long that it (the rectal mucosa and lining) died and allowed the guts to come out OR it was torn by something. Once the intestines are out, it's pretty much game over. If it was a vaginal prolapse, that's mighty bizarre.
I agree with looking at nutrition, body condition and parasitism for the cause. Ask the vet!