I would be sort of surprised if such a thing has not been made, though I imagine between straight co-op and the lives thing most are probably content, or will do something like run two instances of an emulator at once and go head to head as it were.
There is a possibility that this could be a fairly easy hack, if not terribly elegant. If you alternate on death then the trick would be to make you die at the end of each level (might be harder for warp zones) and if calling the death function makes you alternate then you have your answer. If it costs you a life then maybe add a bonus life at the start of each level. This you might be able to do with a level editor.
Two main ways I would set about this.
If you put a pit between the flag and the castle does it count, and does it allow you to start the next level?
If you fire the death routine after the timer, fireworks and whatnot happen does it shuffle you over?
Granted if you can alter the latter then you could probably be able to find the alternate character thing and do that instead. Bonus for you is the Super Mario on the NES is one of the most well hacked games with a nice commented disassembly. https://gist.github.com/1wErt3r/4048722
(warning a bit of a browser grinder)
The death routine starting at 2906 (though the bit you probably want being a bit lower) being something good there. Might be able to go to an end level function (line 1231) and add a bit more/jump to somewhere to add a bit more to do the player swap instead, looks fairly small as well (or at least is a function in the disassembly called TransposePlayers located at line 3004, which means end of level could well have a little JSR to the location of the TransposePlayers thing. You could also NOP (short for no operation) the death swap over if you wanted and have deaths continue until level end or maybe out of lives (haven't checked the code to see what goes but would be worried about a crash or something odd in that scenario).