I assume that you are sure it wasn't a water tank?
Legal depends on your local planning regs....Safe..depends really. The oil used for heating is not spontaneously flammable. It requires a wick or vaporisation to ignite. The upshot of this i that if you light a fire under the tank and boil the oil it will ignite, but if you chuck a bucket of the oil on a campfire it will put it out. (in the absence of a wick).
In other words, I wouldnt do it, Im not sure that any plumber would recommend it, but its not as suicidal as you may believe..