Yes - it is important to treat dogs for worms every six weeks when they are puppies and every six months after the dog reaches six months of age.
Also, children should be made aware of good hygiene practice around dogs eg: washing hands after contact with the dog and not letting the dog lick their faces.