Never ever give consent to any search of anything without a search warrant. It is your right to not give consent to a search, the Sheriff was out of line to search without your consent and I would file a complaint to his superiors ASAP. Again never ever give consent to a search. I would make a BIG DEAL out of it and perhaps it would get your citation dropped because of it.
Amendment IV
The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized.