The rim of the pipe is the flange that the toilet sits on. Just replace the bolt.
To remove any cast iron on that system, you will need a "soil pipe cutter" or snap cutter. (A large chain like contraption with a large ratchet). No hub couplings are the hardware used to join cast iron.