I've had this happen with a few fish over the years, where it looks like an injury or a scrape and the flesh appears to be burning off like a sore open flesh wound. I find it happens when a fish is stressed. In one instance I had a fish that was suddenly being bullied and then this illness broke out. My guess is that it's some sort of opportunistic bacterial infection that takes effect when the fish's immune system is compromised from stress (be it bullying or water parameters or whatever).
Fortunately, I have successfully treated it with a 100% recovery in a few fish over the years. I find that a small 5 gallon hospital tank, as quiet and gentle as you can provide, with calm water flow but good aeration such as an airstone are key. For meds, I combined a half tablet of Tetra Lifeguard along with a mild dose of API erythromycin for about a week which seems to stop it and allows the fish to recover. I have also mixed in a very small amount , say 1/4 of the dose of Tetra's fungal dissolving tabs too. It's not exact, just try to use your best guesses scaled down for the amount of water in a 5 gallon. I change the water every 2-3 days at the very least; trying to give the meds enough time in the water to take effect before changing water, but then re-dosing appropriately after the water change.
After about 1 week the infection subsides and you'll see the wound begin to close, fins regrow and general disposition improves. I usually keep with the meds, but lighten to doses up a bit into the following week, and then during the 3-4th weeks no meds, just clean water and as soon as the fish seems ready, I reintroduce and have had success that way. Also, don't expect your fish to eat much if at all while treating this. Mine barely showed interest, maybe an occasional poke at a pellet was as much as I got them to eat while in isolation. Just don't want to foul your water too quickly with uneaten food while in a tiny medicated tank. Be sure to remove anything they don't eat. If they will eat though, that's even better.
Good luck - oh and keep the water a little cooler than normal too, seems fungus doesn't grow as well in colder water and is less likely to attack the wound this way.