You'll want to remove and destroy all pieces of it, as the way they reproduce is by segments... so the puff eats a small segment, then the worm's life cycle starts over, until the puffer passes the worm. Then the puffer eats the worm.... etc etc etc
Sorry if I'm freaking you out, just trying to give you some info so you know what you're dealing with here.
When I dewormed my boys they'd have several small worms hanging out the anus (ain't that pretty?

) that were reddish brown and slightly smaller than bloodworms in diameter.
This is why we quarantine fish, lol.