Not exactly. If you know about feudalism (Lords, knights, peasants) the samurai were the equivalent of European knights. Because of the cost to arm and armor them, they were quite literally the equivalent of today's army tanks. A samurai could lose his master and become a 'ronin' but it would be almost impossible for him to fall so far down the social ladder that he would become a ninja.
That's because ninjas were an entirely different social caste, almost like the Indian "untouchables." Many of them were literally outhouse cleaners. Because they had no social standing, they could go places no one else would go and do things that were literally unthinkable to the rest of society. (Example: Hide in an outhouse, right down in the raw waste, and stab your victim from beneath while he's doing his business.)
A ninja who finds himself fighting anyone has flunked ninja school. Ninjutsu is about sneaking into a secure location and assassinating an unprepared victim. Escape and evasion may be involved, but are secondary to completing the mission.