Is driving too high a line while under caution considered a safety violation?
Evidently not. Not that NASCAR would've punished Tony had he NOT killed Ward.
He was the big duck in a little pond (or however that saying goes) so it's not like they would've thrown the book at him the way Tony threw his car at Ward.
As near as I can tell, the rules don't say anything about what line cars must take under a yellow flag. They do say cars must slow down to an unspecified speed as enforced by a pace car (don't know if there's a pace car in a sprint car race), but there is definitely no passing permitted.
A new NASCAR rule has been added which prohibits drivers from exiting disabled cars and wandering around on the track, unless there is an immediate risk of fire or explosion (rare these days). Apparently, this wasn't in the rule book previously because no one thought that a driver would be stupid enough to do what Ward did, but they didn't take into consideration what being high on pot might do to a driver's judgement.