If you can get to a good vet, that would be helpful. Ducklings can recover from very serious issues, so don't forget that.
The usual things to consider for ducklings are:
if on chick starter, they are likely deficient in B vitamins especially niacin (B3). I feel that it's not just chick starter, but also the individual duck's metabolism. To work on that possibility, 150 mg of niacin - plain niacin, not timed-release, not no-flush - per gallon of drinking water their first three months. It won't hurt the others.
And it could be an injury - time off the leg can help. Some folks make small slings (make a way for the poop to fall to the floor, not pile up around the little one's vent). Time in brooder-temperature water can help, but with littles, they don't float so well. But the warmth and the joy of being in water is therapeutic for ducks. Some days, I'd like some brooder temperature water to float in... but I am in New England without an indoor pool
Epsom salt compresses can do wonders. You need to remember Epsom salt is a laxative!!!!! So you can soak a clean rag in Epsom salt solution and wrap the leg and the foot and hold the duckling for as long as you both can stand it - 15 minutes or so, two or three times a day. The Miss Lydia system has you put the Epsom salt water in a flat-bottomed, smallish bucket and hold the duck gently (no pressure on the legs, and with the duckling you could just hold the duckling so the legs are hanging) for several minutes to soak the leg. But no drinking the Epsom salt water! We do not need to add diarrhea and dehydration to the challenges.
With ducklings you want to be careful, but you may consider using a teeny tiny dab of arnica ointment, or T-Relief, or comfrey salve to continue to soothe the inflammation of the leg.
There is a possibility of infection, in which case antibiotics would be indicated. That's when having a good duck vet comes in handy - they can diagnose the infection and prescribe the appropriate medicine.