In Scott Joplin's Gladiolus Rag near the end there is a brief modulation from D♭ to A then back to D♭. I know a composer can modulate to any key at any time as he likes, but I suspect this is a common pattern in ragtime and perhaps even some classical pieces. Is this modulation some kind of identified type?
By definition, a modulation must reach a cadence in the new key. Since there is no cadence on B♭♭ here, it's technically incorrect to call this a modulation.
Instead, he's simply using a B♭♭ chord right here. We understand this from a theory standpoint by calling this a "borrowed" chord or a "mode mixture" chord. What we mean by this is that Joplin is "borrowing" a chord found not in D♭ major, but in D♭ minor; in order to create a colorful harmony, he's mixing these modes (hence "mode mixture"). In Roman numerals, this would be a ♭VI chord in D♭.
But he does make this even more interesting by prolonging this B♭♭ chord by means of its own V, F♭ major. So not only is he using mode mixture, he's actually tonicizing this mode mixture! Great example.
PS: The cadential six-four that comes after this chord is, from a textbook standpoint, "supposed" to be on the downbeat of the measure. Interesting that it isn't!
I always try to explain a progression- or like in this example - a borrowed chord by transposing the music to C major key:
When the tonic C is extending to Ab, we have a lowered bVI degree: Ab-C-Eb, borrowed from Cm, the parallel key of the C.
As you see all other answers are correct! But I find it is more obvious or insightful explained the situation in C major or even in the language of solfege - for those who know it: I = Do Mi So (tonic) and bVI = Lu Do Ma, the VI of Cm.
Now in Db - this makes it more complicate to understand, the parallel is Dbm and the VI of Dbm is Bbb-Db-Fb (and not its enharmonic equivalent A-C#-E). But modern pop music notation isn't as 'careful' handling harmonic relations.