Yup, Looks like worms.
You need to get a de womer. Either one that is meant for the food or one for a 'bath'
metronidazole or Prazipro are good choices.
Feeding is IMO better as you know the fish got the meds, but a bath can work too.
However, if you buy the one for the bath then treat it as a bath and dont add it to the food, meaning follow the directions on which ever you buy.
I don't know "how much time' you have. A lot of fish have worms and can last a long time, it depends on the type and infection rate; meaning if he has a large amount.
I would treat them as soon as you could.