You realize you had no legal obligation to give the cop your ID, right? You are only required to tell him your name, address, and DOB. You didn't need to follow him. He couldn't hold you. If you asked him "Am I under arrest?" he would have said no. Then you could just leave. If he said yes, you should have asked him why. He'd have nothing to tell you.
That may be how it works in Canada.. In the US, the cop had probable cause, based on a complaint and description, that Tattoobradley had committed a crime. If he had refused to give the cop his ID, the cop would have detained him long enough to ascertain his identity, and would have had every legal power to do so. Oh, and at the point where he was required to accompany the officer, Tattoobradley was legally "under arrest".

In the US, you do not fight, or argue with a police officer on the side of the road. You cooperate with him fully. If he is outside his legal authority, you hire a lawyer after the fact and sue the pants off him. Security guards, on the other hand, are private citizens. Them, you can tell to take a flying leap on a rolling donut.