This actually happened in the Hork-Bajir Chronicles, when Aldrea is nearly infested by Esplin while she is in Hork-Bajir morph.
Because the Yeerk is its own sentient entity, I doubt it would morph itself to be permanently stuck in the demorphed form.
More than likely a Yeerk would simple feel the shifting of the host brain as it demorphed, and would remain in control of the body. This would only apply when a Yeerk had infested a morphed host, and I'm sure if the host's natural body were, say, a fly (just as an example--a sentient, intelligent fly, okay? XD) then the Yeerk would explode out of the tiny body.
On the other hand, if a Yeerk makes its host's natural body morph, the Yeerk's mass will be extruded into z-space along with the rest of the morphed mass.
At least, that's as best as I can guess