People without military experience underestimate the penetrating power of a 50 caliber machine gun. Firing 800 rounds per minute, each of which can penetrative up to three inches of steel, they are hard to stop. While certainly a single round would not threaten a dragon, the rapid fire ability of these weapons would, I think, tear through dragon hide and take one down in fairly short order. The Russian ZSU-4 would be a dragon killer.
Then there are larger caliber rapid fire weapons such as 20mm and 30mm minigun chain canons on Apache helicopters and A-10s. Those suckers would decimate a dragon.
Oh, and all that fire breathing would make dragons great targets for heat seeking Sidewinder class missiles. Again, I’m not sure one of those would take down a dragon, but multiple shots would be devastating.
A dragon’s slow speed might even make it susceptible to TOW, and Hellfire type laser guided weapons that do pack sufficient kill capability to take one down with one shot.
A single infantry company could (with sufficient ammunition) dominate a Game of Thrones battlefield (excluding dragons and other magic). For example, from four times the range of the archers they could have decimated either sides ranks in the Battle of the Bastards.