Honestly would not go with any off-leash until this is under control.
The randomness of this behavior seems like it would make it a bit more difficult to adjust with much confidence, given the lack of consistency and thus lack of opportunity for consistent training. Without additional information and with ankles being the target, it sounds a bit like an aggressive herding behavior... but who knows...
Of course, it would be wise to ensure the dog knows that biting and nipping under any circumstance is not acceptable - be it play with people or dogs, or be it resource (or people) guarding. Prey drive is always another potential contributing factor.
Either way, your priority is to the safety of your dog and others, not to the convenience or idea of off-leashing. Personally, I never let my puppers off-leash when they could encounter other unfamiliar people, animals, or dogs, but I would definitely recommend that you avoid doing so until your confidence in their behavior is at 100%.