In World 2-3, there's the old Koopa Stair trick in the game. But I find that kind of hard so I go to World 1-2. Play through the level until you get to the point where you go down underneath the ground by the goomba. In a block there's a star. Get it and run straight to the end of the level, hitting every enemy on your way. Then get the 8 red coins just before exiting to get another 1-UP (provided you have a power-up other than a mushroom) and hit the top of the flagpole for another 1-UP, bringing your total to a whole lotta lives.
Oh yeah, to stay as No-Hat Mario, you need to keep 99 lives.