A picture would be good.
What color is it? Is is a pale beige color? If so, it would be best explained as glanular material that comes from the hemi penal pouch. If you take a tissue and slowly apply pressure, it will come off. A lot of males well express these at the same time as defecating, but since they come off the back of the cloaca will not come off totally at that time.
If it looks red/purple and swollen and crusty, (like a sea anenome coming out- they have two) your cham has a prolapsed hemipene and will require assistance by a vet. Of course this happens at night or on a weekend, so is a real inconvenience. There are a few things that can be done in the meantime.
Sounds like # 1