I've had this happen with a hop bag where it clogged up the output. I used the racking cane to try to fish it out. It didn't work. I did manage to knock it loose though, so I was able to pour beer again that wasn't 90% hop matter.
In case you didn't pick up on it, I knew that the output was clogged because my beer was fully carbonated and I was trying to pour a beer. I was so set on drinking that beer that my brain failed to register the implications of what happens when you disturb carbonated liquids with physical force. When I agitated the beer with the racking cane in my attempt to fish out the hop bag, I released ridiculous amounts of CO2. The beer started foaming everywhere. I put the lid back on the keg, and it continued to foam out. I had to hook up the CO2 tank again and apply pressure to get the lid to seal before the foam stopped pouring out of the keg.