McIlroy, his caddy Harry Diamond and Jon Rahm were chatting away when the incident happened and, shortly after, security removed the man from the property at Renaissance.
An onlooker told The Scotsman: "When someone told him that he couldn't do that, he replied by saying 'why not? At that point, the security people assigned to following the group moved in and took him away."
David Wilson, a member of nearby club Kilspindie who posted the footage, added: "He was quickly dealt with. The players laughed it off, saying they knew he wasn't a golfer when they saw his grip."
McIlroy, after his second-round 71, added: "It was a surprise, yes, but it was handled efficiently and everything's OK. I had no idea who he was. It was handled quickly and that was an end to it."