This happened to My Leghorn. I gave her a warm bath in Epsom Salts & with Rubber gloves on, put Sugar around her Vent for 3 days & kept her inside a dog crate. The Sugar Helps the Vent go back inside. Preparation H also helps with the swelling. My hen went back outside with her flock 3 days later.
Was there an egg? I have one in "hospice" now with an egg stuck outside the body. The tissue prolapsed appears hardened around the egg. I've been bathing and applying honey.