It’s legal.
The north west mountains have grizzlies that walk all over the mountain ranges that connect to all sides of the park. However, the places with highest concentrations are what you need to be aware of. Don’t worry about cats or black bears or the locals will make fun of you.
The best thing you can do is educate yourself about what situations to avoid and how to hunt safely in griz country. The book Bear Attacks Their Causes and Avoidance is a good one.
Having said that, if you step around a tree and come face to face with a momma and cubs, or any grouchy bear, sometimes they get right after it and you won’t have much time to react. In those cases it’s not clear if you’d be better with a big can of bear spray or a pistol. If my buddy has a bear on him I’d much rather have a pistol instead of getting up close to the action. However if a bear gets a good spray in the face, even if he knocks you down the pepper spray is working to change its mind. Most pistols are not going to put a bear down right away even with multiple hits in vital areas.
Bear spray is much lighter, but get a big one that sprays a long way.