How can someone with newly broken rib dance?

Slow dance. Depends on how you dance. Certainly no lifts and no strenuous or sudden movements.
Rib fx. It will be difficult to dance with a fractured rib. I would suggest waiting till the pain resolves.
Rib fractures . With pain control.
I would recommend 6-8 weeks of rest. Allow the bones to heal.
At the same time remain as active as tolerated.