Not normally, no, so I admit this is a bit odd.
On the other hand, there have been reports—albeit very, very rare ones—of pokémon using moves they wouldn’t normally be able to use. For example, one of Lance’s dragonite apparently knows how to use Whirlwind, despite the fact that the species’ wings are far too small for such a move (hence why almost all other dragonite can’t learn that move). Likewise, one of Wikstrom’s scizor can use Shadow Claw, despite the fact that the scyther family can’t actually channel ghost-type energies to begin with.
Needless to say, such instances are of great fascination to researchers because we’re not quite sure how pokémon can learn these moves. Certainly, most of them can improvise Tackle or Peck (which happens so frequently that it’s actually considered a bit of a different story), but something like Shadow Claw or, in your case, Flamethrower is a lot more complex. One popular theory is that in some cases, such as in Wikstrom’s, a trainer may be so skilled that they can overcome certain physical limitations in order to unlock potential hidden deep, deep within every pokémon.
The other, which addresses cases of accidental move tutoring, is that these moves are actually improvised from completely different techniques or elements and merely channeled into approximations of other moves. For example, the scizor family is capable of channeling dark-type energy, which often behaves in the same manner as the ghost-type, so what we see as Shadow Claw might actually be more accurately called a Dark Claw. (On the other hand, having seen Wikstrom’s battles, it’s more likely that he’s simply a very, very skilled move tutor in line with the first theory…) In your case, meanwhile, either you have an exceptionally talented totodile, or your totodile attempted to harness the dragon-type energies it does have access to in order to execute an improperly formed Dragon Pulse. Perhaps even Hidden Power.
Best of luck on harnessing this rather fascinating gift!