Sounds like a uterine prolapse and it's a rare but very serious condition, often fatal.  I had a hen do this and Maymiegirl gave you good advice.  My hen, Esme, had expelled the egg but it was encased in a membrane.  
Step 1: I kept it lubricated with Vaseline and first I re-inserted the egg and inserted my finger in the vent next to the prolapse to try to find the egg and guide it out the right way.  Esme kept trying to push the egg out and I couldn't find the right pathway, so this was a no-go.
Step 2: I ended up slicing the membrane with a sterilized Exacto knife (try to slice a spot without blood vessels), extracted the egg, and sewed her up with a needle and thread (also sterlized.)  Her prolapse disappeared back inside her.  I had to hang onto it to keep it from disappearing before I could sew it back up.
Step 3: I kept her isolated, but I chose not to medicate with pain reliever or antibiotic.  There were maybe 2 or 3 drops of blood on the floor of her cage - so not much bleeding at all.
If she ever prolapsed again - I am prepared to put her down.  It could be a deformity in her that causes this and you cannot stop egg production, so it would be constantly happening.  Prolapse can also caused by calcium deficiency - I had let my oyster shell dispenser run out, so I filled it up and haven't had a problem since.  
Good luck!