Is it the white string under the fish? If so, it's usually a sign of internal parasites and can be transmitted via poop to other fish.
I'd watch his poop often to see if the white poop is consistent. if it is always white and stringy, it's probably internal parasites.
If this is the only time you see stringy poop, it could have been caused by constipation or stress.