These are the seeds, also called 'sand burrs' of a plant , sometimes called 'goat head' ( Cerchus incertus and spp.).It's found in sandy soils in grassland .The seeds have sharp pointed burrs which penetrate the skin.
How to deal with them or the dog? The dog training is for others on this site but it sounds as though you'll have to keep him or her on a leash and treat him as you would for any other case of the dog going to something you don't want it to touch e.g. a firm sharp tug on the leash, with a very sharp NO ! followed by distracting the dog and praise when it moves away.
As to removing them, ask you vet how best to do it. Can't think that it needs a visit to the vet each time. If it did, I imagine, half the dogs in Kansas would be in the vet's every week. Failing that ask an experienced local person, with long experience of dogs, who'll have experienced this, how to do it.