I think you can come up with a variety of biochemical explosives; these have been addressed many times in numerous variants in worldbuilding. But I think you need to address the larger problems with your technique, and come up with a solution to your dragon-on-dragon fighting.
First, internal explosions are very challenging for organic life. Lots of our parts are soft, mushy, and prone to tearing, crushing, and shock effects. I think that you can compensate for most of these with a tough, bone/shell tube with lots of muscle, but that barrel will still be rather elastic (to deal with recoil and shock) and tend to absorb much of the force of the blast. So your projectiles will tend to be underpowered.
Second, you are fighting dragons, who have presumably evolved to deal with this kind of attack. The likely have various layers of composite sandwiching to absorb shrapnel and relatively low-velocity piercing attacks. In other words, what they can't dodge probably can't penetrate.
What you need is a sabot round. Your dragon needs to apply more force to a small projectile than what an average dragon throat will probably be able to manage. Further, most tiny, armor-piercing aerodynamic projectiles won't conveniently fire out of a large cannon-barrel/dragon throat - the shape would be wrong.
So your dragon manages a relatively large but low pressure explosion using whatever flammable gas they can muster for a dragon breath. But the dragon has laid an internal egg. This can be a hard shell/calcium carbonate spike, or perhaps something heavy and thin it has swallowed and built up a pearly coating on like a clam (this might explain dragons attacking knights - they want to swallow swords and dense sharp metals).
The egg creates a sabot around the projectile, so the gasses are trapped and efficiently propel the missile out of whatever orifice the dragon is firing. The shell flies apart as soon as it leaves the dragon, and the small armor piercing projectile has lots of kinetic energy and possibly even aerodynamics to penetrate it's armored foe.
- As an alternative to the sabot design, an egg similar to what Mike Serfas was proposing could be internally manufactured but then laid and carried in a special armored pocket on the dragon. Accidental detonations would be carried away like a shaped charge or claymore. The dragon could use a prehensile tail to hurl these projectiles at their enemies, allowing the explosives to be safer for the thrower and not requiring so much internal modification of the dragon to work.