Good question. I mean, it's not a 100% safe that it's even sick and not "just" starving. General cure also wouldn't be the right med, I'd go with something especially against internal parasites. Sera Flagellol works and is available almost everywhere. If not, look up the main ingredient and try finding a similar product. As I said, I doubt the fish has internal parasites anyways, so I can't give you insurance that this will help at all.
For the same reason it's also a good question if the other fish can get infected when they scavenge on it. Depends a bit on what other fish you keep with them. I kept mine with
cardinal tetras, who are scavenging quite a lot in the wild as far as I know. They didn't even let go when I was trying to get the bodies out with a net and a manipulator. They just ignored those and went on feeding.
Most often the other fish have already been in contact with the pathogens at the point a fish dies. So... I think it doesn't matter anymore. Rather focus on prevention for the other fish. Feed all of them high quality foods, maybe add something with
tannins to strengthen their immune systems and do your waterchanges. Then if the unevitable should happen, just be quick and get out the corpse before the others go into piranha-mode.