Not unless there are live worms in the milk.... Milk may or may not agree with the dog, but that does not cause worms.
Not usually, they are more likely to contract worms from eating plain sand. There used to be an infomercial when I was young warning children of the dangers of eating sand, wonder why they stopped running it. One of my brothers when he was real little got worms from eating sand. It was apparently caused by virus ending up in soil due to dog droppings. That is why it is so important to stoop and scoop, and not let your dogs go on beaches or sandboxes where children play