Car chasing is a common cause of sheepdog and cattle dog deaths.
In some cases, car chasing is even more serious than sheep worrying, because it's natural to try to avoid a dog which is chasing your car, so the chances of a collision with another vehicle or pedestrian are greatly increased.
It's important to do all you can to prevent the dog having access to sources of mischief - cars driving past, chickens, cats and other moving objects soon become 'quarry' for a keen young dog but if they're allowed to chase everything that moves, the chances are that sooner or later such distractions will prove fatal, either to an animal or bird, or even a human.
Dogs are creatures of habit, and the older they get, the more entrenched their habits become, so the earlier you can train your dog not to chase cars and other vehicles, the better.
Normal playing, such as with a ball or even digging will do no harm in moderation - we encourage all our dogs to retrieve balls and frisbees but they know the difference between work and play. A dog which is properly focussed on its sheep will never play with toys while it's working, although Carew (probably the best sheepdog I've ever had) will sometimes pick up a small stick when she's pushing sheep into a pen, or trailer! This has never hindered her work in any way, so I ignore it.
A very useful 'toy' is a large bone which will keep the dog occupied for many hours and do wonders for his teeth (and breath) at the same time. Beware of small bones, dogs can choke on bones which become stuck in the throat.
If your dog shows an interest in chasing cars, it's fairly easy to cure if the dog's young but you need to be vigilant. Make sure you're near the dog whenever there's a possibility of a vehicle coming along, and call the dog to you, then try to give the dog something else to do - even a small treat.
Praise the dog if it obeys your request to come to you rather than chase the car - but be sure to shut the dog away from any access to cars or vehicles when you're not around.