Thanks a lot for the hint, Gbreeze!
In case you still didn't get it, here's what I think is
the intended solution:
Jump from the "passable for sprites" blocks headfirst to the bat I lure and hop off of yoshi at the same time while midair, in time for me to hit the invisible coin block before yoshi is about to die to the lava. The bat will respawn after you enter the blue pipe and then return. I just tried that.
Damn, this hack is ingenious.