That may work for simple incandescent lamps, where the voltage is always 120 volts.
But you should be thinking of watts as the product of voltage x current.
For fluorescent lamps, the lamps are designed to handle a certain amount of voltage and current. That gives them a wattage rating. The ballast regulates the current that flows into the fixture by adjusting the voltage it applies across the lamp.
So T12 lamps are normally designed to run at about 40 watts. You can get high power factor ballasts that might run them 10% over that, at 44 watts. You can also get Low power factor ballasts that might only run them at 34 watts.
T8 lamps are made to run at about 32 watts. Again, ballasts can be selected to run them a little higher, or quite a bit lower.
So when you connect a T8 lamp into a T12 fixture, you will probably overdrive it.
Also, fluorescent lamps have different starting methods - preheat, instant start, rapid start, programmed start, etc. The difference in starting between a T12 and a T8 might be the first think to kill a lamp when you plug it in.