No, you can beat it but if you miss one of the clue rooms located in the five over worlds you can't unlock the vault at the end of the game and beat the dragon. Then I think the levels loop until you get all the clues.
The arcade version does loop though, at least from what I played. I have it on the PS1 and got to level 380 something before I finally gave up.