It's a worm. Fish get parasitic worms in their flesh from time to time. Some are not actually harmful and are only using the fish as an intermediate host while they wait for their real target which is a bird or other fish eating animal.
To treat this, the fish should be placed in a bare bottomed hospital tank and use a medication like Fritz Expel-P or any medication containing Levamisole HCL. They will need to follow the directions on the medication but most importantly, they will need to siphon the bottom of the tank to remove the worm since Levamisole does not kill the worm but just paralyzes them. ( This is why you use a bare bottom tank. )
Hope this helps