Assuming that, as FVM mentioned, that when you are in charge mode somehow you already know how to chop the mains voltage, I can think about a half dozen reasons this is not a good idea, but I will list the most important three:
1) Poor core utilization. When the inverter winding is working the charging one is idle, and viceversa. This idle winding is doing nothing, but is still occupying a core window area.
2) Difficulty in achieving low leakage inductance...for the same reasons as above. Low leakage inductance is crucial for successful and efficient high frequency conversion.
3) Difficulty in isolating the charging and inverting functions between each other. When one is active, and the other is inactive, it will still present some sort of loading. Plus it will have to withstand some voltage stresses.
Again, it could be done. But it is not practical.