Yep, it did happen! We know, in part, because there were laws passed establishing penalties for impersonating a member of the nobility.
It tended not to be rich merchants who did this sort of thing, since they had the option of just buying their way in legit-like, but more often medieval confidence men and other tricksters who were keen to profit off the social mores or status of the nobility.