Perhaps there’s no such thing as a fire-breathing dragon. But a lava-farting creature is real and apparent. Introducing the bombardier beetle. It ejects a hot, burning mixture (of hydroquinone and hydrogen peroxide) from its butt when threatened. At almost 100°C, the mixture is hot enough to boil the inside of a predator’s belly until the predator vomits it up.
But how does the bombardier beetle avoid burning itself?
In the wise words of The Offspring, "You've gotta keep 'em separated!”
Cleverly, the beetle keeps two separate chambers in its body. The first one stores the hydroquinone and hydrogen peroxide (which does not react on their own). And the other chamber holds of cocktail of special enzymes that reacts with the "h" liquids.
When threatened, the beetle breaks down the hydrogen peroxide with the enzymes, producing water and oxygen. This in turn reacts with the hydroquinone, creating a new compound called benzoquinone. During the reaction, the liquids release a lot of heat which boils the spray up to 100ºC. The bombardier then controls its abdominal muscles, takes aim, and blast it at the predator.
What about dragons then?
Well, the closest thing to dragons are the pterosaurs — flying dinosaurs with a wingspan of 10 metres (that's both wings measured together).
Pterosaurs are as big as a smalll airplane, but definitely not as large as Smaug from Lord of the Rings. They're adapted to flying because of their hollow bones (very similar to birds), light slender build, lack of bulky muscles and heavy tail, and of course, large wings. It'd be much easier to take off by launching off from a cliff. But the pterosaur could also utilise their strong legs to jump up and get airborne, much like how pelicans and storks do.
Dragons can't be much bigger than a pterosaur. If so, the dragon needs to be even lighter-build, with hollower bones, and wings made out of lighter but stronger material. Muscles need to be kept to the minimum, so hunting or defense would have to rely on other capabilities. Above all, a dragon's size would be physically limited by the square-cube law.
The square-cube law is a mathematical principle that describes the relationship between surface area and volume. For example, if a dragon doubles in size (surface area is squared), its volume (i.e mass or weight) would simultaneously increase by the cube.
So let's say we have Smaug who was initially the same size as a pterosaur — weighs 100kg with a 10-m wingspan. If Smaug were to double in size with a wingspan of 10 metres, its weight would cube-up to:
100kg x (2)^3 = 800kg
That's almost a ton! Smaug would go from El Drago to El Gordo.
Now, let's double Smaug again in size to a 40-metre wingspan (it'd still be tiny compared to the 100-metre dragon described in the book). Its weight would now be (800kg x (2)^3 = ) 6,400kg, which is as heavy a full-grown African Elephant bull.
Beyond fiction, the square-cube law dictates that the wings of a dragon will not increase as fast as its weight. Which is why large birds like the ostriches can't fly.
So, in reality, fire-breathing flying dragons can exist but they would be more the size of Toothless, the Night Fury, in How To Train Your Dragon.