What does "rapid" mean in terms of igneous rock formation?
Obsidian is volcanic glass of felsic composition (i.e. SiO2-rich) whereas basalt is a volcanic rock which may or may not be (partially) glassy of mafic composition (i.e. SiO2-poor). So when you're saying


  obsidian as opposed to basalt


...you're comparing apples and oranges. So instead of discussing obsidian versus basalt, let's discuss phaneritic versus aphanitic versus glassy rocks, in the context of being melted by dragons (because that's what you're asking in your question).


Phaneritic rocks are those with coarse crystals, easily observable to the naked eye. The best example is granite, like the stuff you see in pavements and kitchen tops. These rocks form by slow underground cooling so this is not something that dragons can make.
Aphanitic rocks are those with very fine crystals that are only visible with a microscope. Basalt is the most obvious example. To the naked eye they may look like glassy, but they do not have the characteristic conchoidal fractures you see in obsidian.
Glassy rocks (that I'm pretty sure have a fancy name that starts with hyalo, I just can't remember what it is) have no crystals in them so they're basically glass. Obsidian is the best example.


Note that there could be combinations of those, just to confuse you even more: for example you can have aphanitic rocks with large crystals of minerals (known as porphyritic textures) or a rock that's mostly glass but has some crystals floating around in it.

When you have dragons melting rocks, the cooling of the rock is done very rapidly in air. This can be minutes to hours, depending on the size of the block being melted. This is definitely rapid enough to form rocks. But, the final form of the rock also depends on the chemical composition. Felsic rocks have very high viscosities and low diffusion rates, and even relatively slow cooling (days?) can form obsidian. That's actually the reason that obsidian is most common in felsic rocks. Mafic rocks, on the other hand, require very rapid cooling to form glass (for example, erupting into water), and even then they make have some "quench" crystals of olivine or pyroxene.

Felsic rocks also have lower melting points than mafic rocks. This all leads to the conclusion:

Yes, dragons can make obsidian, and it's quite easy

Take a granite (or even sand-bearing mud), melt it with some dragon fire, and let it just cool. The high SiO2 content will make the melting point rather low (let's say below 1000 °C). The high viscosity will ensure that it stays where it is rather than flow somewhere else (think of basalt flows of Hawaii versus Mt St Helens felsic lava domes). Obsidian will surely form.