I'm not a lawyer, but I am fairly certain that the gym legally can't withhold the ring if you can prove your child was on the mat as a registered athlete. I think any small claims court would rule in your favor. The gym could then file a counter claim if they feel you own them money for services rendered (tuition, comp fees, uniform, etc) and if you can't prove that you paid the amounts due, the court would rule the counter claim in favor of the gym.
Ethically is another story. I would never withhold a ring from an athlete regardless if I was owed money. The athlete would get his/her ring and I'd find the most ruthless collections company I could find and deal with the parent directly :D