I accidentally treed a bear cub some years ago in the Smokies. I thought it was cute for a second, looking down on me, until the hair stood up on the back of my neck. I scurried back down the trail as the bushes rustled behind me. For lack of any better idea I stood well back and belted out the Star Spangled Banner at the top of my lungs to let the bears know I was well away from them. (Fortunately no other hikers arrived to witness this ;-)
the mamma would naturally react aggressively.
Most mamma bears, even of the hyper aggressive grizzly bears in the lower 48 states, do not attack people when people and dogs happen across them. Most mama bears this happens to leave the area.
A few mama bears are hyper aggressive and attack people when people happen to encounter bears in the wild. They are the exception, not the rule.