That looks like a prolapsed vent or cloaca. It sometimes happens while laying an egg or straining. She could possibly be straining to lay. Is she getting any layer feed or crushed oyster shell in a separate contain to eat as she wants? If she prolapses again and the red tissue stay out, be sure...