Yes, it's possible that deodorant could attract bears. ALL scented items just like food, should be put into a bear canister. Any tioletries like deodorant, toothpaste, tooth brush, etc. should never be left in your backpack or your tent. Any odorous items (even gasoline) should be stored away from your campsite and out of reach of bears.
If you want to bring deordorant while camping, check out unscented deordorant.
You should put snacks, toothpaste, sunscreen, bug repellant, deodorant, cosmetics, etc. into your bear canister or a ordor barrier bag or air tight storage bag. Also only bring small amounts of toiletries, so you don't take up too much room in your canister or add any unnecessary weight to your backpack.
Bear canisters should be placed at least 100 feet away from your campsite.
Be sure NOT to sleep where you eat and cook. Moving away 100 feet or more is recommended. Wash any utensils or cooking pots and keep them away from your tent. Avoid cooking or eating smelly and greasy foods such as bacon or smoked fish.
Any clothing that has been soiled by food or game butchering should be left out of your tent and kept with your food supply.