This has been discussed quite a bit already (and probably several times before my Dakka debut)
Essentially
RAW, no. But that makes Razorbacks and other turret mounted vehicles that can have templates a bit silly since they can't fire.
RAI is probably yes, but it clearly violates the rule you stated. It would be an important thing to discuss before playing your opponent and, if necessary, roll-off.
Myself? I would let vehicles fire their templates even if it 'touches' them but it seems rather dangerous to have a guy squirting his flamer out of the hatch. Besides, I like Meltas and Plasma much more.
DoW
Automatically Appended Next Post: Regardless, it would never be appropriate to fire a passenger weapon from any other location than specified in the transport details. Firing from the hull would not only give you a big advantage in any direction but it doesn't make any sense physically.