Yup, youre correct. You cant be tested for 'drugs' by your doctor on an out patient basis. There is groing incidents of 'non-consentual blood searches" in USA and is slowly becoming an accepted practice but you dont have to worry about it in your situation. Thats a rant for another thread lol.
Aaaanyway, allegy tests are not like you are thinking. When you go to an allegist to do the tests you would be given a series of pin pricks under your skin. Each prick contains a common allegen. They wait for a visible local reaction to determine if you are allegic to each allergen. They dont draw blood and examine it because this will tell them nothing about your bodies potential reactions to various substances.
So, no worries about being busted. Get your tests done, youll be much safer.

Side note:My son is deathly allegic to peanuts.Without the tests we never would have known. And without the discussions with the allegist we would not have known that a small reaction ( rash etc.) is usually the first step towards the body gearing up for a major one ( anaphylaxis ) in people with food allergies.