An allergy to sunblock is quite rare. However, there are specific allergies to ingredients used in sunscreen, most commonly chemical sunscreens. Chemical sunscreens, like Octocrylene and Cinnamates, can cause allergic reactions.
Physical blockers, which are preferred by most dermatologists, for example, zinc oxide and titanium dioxide, do not result in an allergic contact dermatitis. This is because they sit on top of the skin and merely reflect light instead of being absorbed.
Physical blockers are also preferable, because they act as broad spectrum sunblocks against both ultraviolet A and ultraviolet B rays.