I always like to answer questions by asking "what similar real-world behaviors do we have that fit the bill?"
I can think of a few.
1) The Bombardier beetle.
This is a series of internal explosions, causing a pulsed jet of boiling spray to be fired as a defense mechanism.
Now, the pulsed jet is not fire. It is merely boiling, so is at a temperature of about 100C (boiling water).
Even so, this is sufficient to deter most predators, and there is video of frogs regurgitating the beetles rather than suffer their attacks internally, so the defense will work even inside a predator.
And they're a good example of an animal which uses chemical reactions, showing that fire-starting chemical reaction is not out of the question.
Would fire be better? You betcha! But... fire also kills. You'd need to be an animal that, if the fire gets out of hand, will not be harmed by it. Flying might help. And beetles can fly. Yay!
Which brings us to the far better example:
2) Australian Black kites have been observed to start fires, which flushes out a buffet of prey, kills it, cooks it, kills dangerous predators, destroys undergrowth that predators and pray might be concealed by, and generally makes life really nice for these predators.
Fire might be a somewhat overpowered defense mechanism, but as a hunting behavior, it kicks ass. Note that the whole ecology will have to be based around regular burns within the area that a burning creature inhabits.
3) Humans.
Humans make fire, and use it for basically the same reasons as the predators, as well as for heat, light, tool use, tool creation, play, sexual display, and more.
Humans initially probably got their fire from the same places the birds above did, and learned to preserve it and keep it burning.
Later humans learned to make it by friction, which is another valid mechanism that animals could use.
Other humans learned to make it with sparks from metallic rocks, and tinder. Again, this is a mechanism that animals could use.
4) Dragons
OK, dragons aren't quite real-world, but consider these dragon-like behaviors we do have:
- Cows make a lot of methane, a flammable gas.
- Birds keep stones in their crops to grind food.
- Some fish-eating birds can regurgitate oily black vomit as a defense mechanism.
- Cobras and tigers can spray liquids considerable distances.
And by now, I'm sure you are thinking "flint stones for ignition, pressurized methane propulsion, and fish oil or other fats for sticky napalm spray".
Add in the flight that we've already established is kinda necessary to take good advantage of fire without getting killed, and that's a dragon.