Yes, you can be allergic to cats and not to dogs but it is likely that you’ll be allergic to both but perhaps in varying degrees. You can also be allergic to dogs and not cats. People are more commonly allergic to cats.
There are five variables, (1) the allergen for cats is a protein in their saliva called Fel d1 (2) the allergen for dogs is a protein in their saliva called Can f1 (3) individual cats can produce a different strength of allergic reaction in people (4) individual dogs can create a different level of allergic reaction in people and (5) the susceptibility of a person to being allergic to cats and dogs is also an obvious factor.
All these factors working together means that people can be allergic to both cats and dogs, or one and not the other, and in varying degrees.
Personally, I am not allergic to cats but a stray male cat made me itch when he came into the room. This is an example of an individual cat apparently producing more allergen than another causing my immune system to react. He was unneutered and people are more likely to be allergic to unneutered male cats. I am not allergic to dogs, as far as I know. I also found that I got used to the stray who caused my allergic reaction so it subsided over time.
There is a lot of variation. It might be worth mentioning that there are no true hypoallergenic cats or dogs. They all have the allergens in their saliva but it seems to be in varying amounts.
You may have heard about Purina’s new cat food which coats the allergen which in turn nullifies its potency. That’s the only way I know of reducing the allergen at source other than an injection I wrote about. Other than that there are steps that you can take to minimise the worst effects.
MORE ON ALLERGY TO CATS: