Based on your question, the assumption is that you have a pvc floor flange and when you look inside you have pvc drain pipe.
There are two answers, one the ‘right way’ and the other the ‘el cheapo way’ that will cause problems later on.
The right way is to cut off the pipe with the old floor flange and, using a coupling, lengthen the pipe to stick up above the new finished floor level. After installing the new sub floor and floor, cut the pipe off to the correct length and install a new floor flange, then properly anchor the floor flange to the floor / sub floor with rust resistant screws.
The el cheapo way would be to leave the floor flange and work around it. This will then be too low when the new sub floor and finish floor height. Now, the only choice you have is to install a wax ring and another wax ring on top of it with a ‘Kant Leak’ (that’s one brand name) insert to help keep this from leaking as long as possible. You will notice that the only thing you are trying ot do is to put the leak off in time, there is no practical way to actually make this so it will not leak at some point in time. Obviously, I do not recommend this method – not only will it leak, but this is also not the correct way to do it.