Depends on the vintage and manufacturer. Mine has a pipe glued to the black tank, and the flange is glued to it. No replacing it without dropping the black tank. Depending on where your flange is cracked, it may not be an issue. As the name implies, the gravity toilets just let "stuff" drop into the tank. There's no pressure so not much opportunity for leaks unless the flange is cracked where the toilet seats.
If the concern is that the toilet is no longer secured to the flange, there are adapter kits that you can use (as others have mentioned). I used a kit to install a new Dometic toilet in my old Allegro. The adapter/flange screws down through the floor and has new bolts to secure the toilet. You need to make sure the base of the toilet is still on the floor. The flange isn't designed to hold the toilet up in the air, only to maintain the seal. In my case I had to install a 1/4" riser between the toilet and floor to make up for the adapter.