I think it could be a water quality issue and can clear up on its own.
If it's a wound of some sort that got infected temporary raising the temp may clear it up as certain bacteria and fungus that specifically can cause this don't like the temperature high, plus speed up the fish's immune system for long enough to also fight it off. It is a risk enough, as other bacteria and also parasites like higher temp but sometimes one needs to chose what to do.
The other option is the issue to have been initially caused by an ecto parasite of some sort.
So starting with water quality is the best, especially that could be the issue if your fish is behaving normally otherwise. Plus changing the water and cleaning up well will reduce the amount of the pathogenic things that may have multiplied happily for one or another reason and turned parasitic. Those things can become harmless again the same way they used to once you turn around the tables for them.