Is the flange actually rusted away, or just looking nasty? CI can last a very long time, but that doesn't mean it will look nice (but it doesn't need to, either!).
If you clean it off and it's intact and the slots where the bolts go are okay, that you don't need to replace it. You need new toilet flange bolts (get brass ones) and maybe a jumbo wax ring. Terry uses one with a plastic horn and one 'normal' one stacked together with the one with the horn on top. You can also use a flange extender, if it can be cleaned up enough.
If it does need to be replaced, while you can do it if you have the tools and skill, this may be one where it's best to hire a plumber.
WHen resetting the toilet, it MUST sit level without rocking. That is likely what caused the leaks. Plus, you also likely have a partial backup in the sewer line, as otherwise, the waste would likely have just gone down.