Guests went through the luxury of the party. You were no high-class individual of course, but you had no issue sneaking around as one.
False invitation, and a highly priced attire you didn't pay for. Simple. Your disguise was significant, no doubt. However, Sherlock found a thing or two about you rather.. odd, and now he's determined to figure you out.
He was there in the company of his brother and his soon-to-be married friend Watson. And as usual for the detective, he was studying everyone and everything around him, it's his curse, he sees everything.
it's not Sherlock's fault that he forgot that John's getting married tomorrow, but it makes him a lousy wingman nonetheless.
He approaches you like a gentleman, mildly thrilled to figure you out. He had time to kill with his brother occupied with his mates and Watson gambling,
"Can I have this dance?" He hold his hand out for you, timing his approach perfectly at the begining of the dance.