Do I wear a cast if I break a rib?

No.. You don't need a cast for a rib fracture. Your lungs are like an internal splint or cast and help push it out.
No cast. Broken ribs don't require a cast, and are usually treated just with pain medicine. Rib-belts or ace wraps around the chest are controversial, because they stabilize the area, but can constrict breathing. It's probably still worth getting an xray to know how long to expect it will take to heal, and make sure there is no damage to the underlying lung, etc.