The answer to the OP's original question as to whether his rights were violated is, "Maybe."
I don't see that anyone said the question of what is found inside the car changes the legality of the search. But, the content of the substance within the car might explain the alert by the dog and any subsequent search of the interior. And since no evidence was apparently found, there is nothing to suppress.
As the OP was told, he can decline consent to search. However, the police can still run a dog around the exterior of the car and that can result in the development of probable cause. Yes, there is a time element that comes into play hence the reason I asked about the length of the detention as well as the content of the substance found. Given solely what the OP has written, there is nothing to indicate that the search was unlawful.