If it's hanging out the back, then it is a prolapse. This can be caused by several things, such as diet, dehydration, or swallowing rocks and bark.
To treat for the prolapse you can do the sugar soaks. When the swelling goes down some, then gently use a q-tip to help ease the prolapse back in. You could also use original preparation H with out pain or itch reliever.
For the impaction you should soak the frog for about 15-20 minutes in luke warm water. NOT HOT water, just warm. This will usually loosen things up and help them pass the impaction on their own. The warm baths can sometimes take more than once. Not sure what you mean by vegetation though.
I am guessing this is maybe a pacman?? If so, rocks are a terrible substrate for these guys. Eco earth or bed-a-beast is the absolute best substrate you can get. It is made specifically to help prevent impactions due to swallowing it. Frogs and moss are both big NO NO's for pacs and pyxies.
the more details you can give us the better though.
Species, age, size, diet, temps, humidity, last poop, etc.
Also pics of the frog and setup would be great to help others figure things out. Best of luck.