This is one of those things where you have to be there to see exactly what you have. A properly done joint on pvc is solvent welded - the cement literally melts the plastic on both the pipe and the fitting, and when the solvents evaporate, it essentially becomes one piece. It can be difficult to remove a fitting from around the pipe without damaging it radically. Not saying it can't be done, but you may have difficulty as a first-timer (and some pros won't attempt it, either). As an aside, this is not true when trying to reuse say a hub...they make a simple tool to bore out the pipe from the inside of a hub so you can then install a new pipe. I've never tried it, but if you got a holesaw sized to fit just over the pipe and maybe a second one screwed onto the mandrel that just fit inside the pipe to act as a guide, you might be able to use that to ream off the toilet flange. The friction may be problematic, and if the guide came off, maybe a big problem! Brute force would have you cracking concrete, cutting the pipe deep enough to install a coupling and a short riser, then the new flange. I think there's some middle ground. But, depending on the toilet you have, if it's internal structure has the turn such that things are not still trying to turn to get into the drain, an inside fitting flange would work. Unless the toilet is skirted, you usually can just look at it from the side and see how the internal passages are routed.