It could be several things as mentioned. Without a good picture it is very diffacult to "guess" at what it might be and give to the correct advise to help you.
Now the oscar suddenly started jumping out of water very vigorously for appro. 1 min. and the thing hanging out of the anus got seperated from it anus.
The oscar felt resless for some time but nw it is swimming ok but doesnot seem comfortable