Normally it would be illegal, as it would mean altering the gamedata in an unintended way.
"Altering the gamedata," as you call it, is not illegal in this case.
According to the license agreement for Multimedia Fusion - and pretty much every other commercial game design software - you are not allowed to decompile or otherwise reverse engineer the game, nor alter or "rip" any of its data.
But this ONLY APPLIES TO THE GAME EXECUTABLE. Clickteam has no domain over the music folder in A Strange Dream.
Neither Knytt Stories nor A Strange Dream has a proper license agreement, aside from the MMF2 one. There are no particular rules as to whether or not you can do
anything with the music in that level.
Nifflas, however, at one point, mentioned that you should not use any content from A Strange Dream, An Underwater Adventure, or Sky Flower in your own productions (KS or otherwise). (The tilesets specify not to use them in your own levels, which really should be a tip-off to this.)
In any case, Nifflas doesn't object to people listening to his music or putting it on an audio player. He is the sole author of said music.
This doesn't necessarily mean that it's legal, but
nobody could possibly have any cause to say that it is illegal, either.