it is not really self treatment situation for sure, you need to proper diagnose what that is that first, it may be that a leg is broken beyond repair, in that case euthanasia is the only option. Tree frog can't really live with one leg, unless you keep it in captivity and take care for the rest if his life. Not impossible though.