This is Von Neumann's War by John Ringo and Travis S. Taylor which features small alien probes/devices reaching Earth via Mars and devouring metal to create more of themselves.
The strip all metal in their path, including metal fillings etc. There is a scene where the government realise that danger and send advisories about dental work.
Cady realized her concern. Some of the horrible images from his and the major’s trip to Paris of soldiers being decapitated flashed in his mind. What if a bot got close enough to pull the metal out of this poor kid’s mouth? If the damn thing pulled the metal straight out of her mouth she would likely lose some teeth and have her lips, and tongue ripped to shreds.
As for the American flag...
Two probes, their surface now shifted from glittering steel to bands of red, white and blue, held the coffin a meter off the ground as honorary pallbearers walked on either side.