Depending upon the intelligence of the animal, sure they can work to solve a problem. The difference being they don't consider the consequences of each choice. They simply act to satisfy the present.
Consider hogs. They are very intelligent but most of that intelligence is used to gather and consume food. They'll root up fields, work latches, knock down barbed wire fences and so forth, but their goal is simply to eat. They don't think past their next meal. Humans can consider the consequences of starvation versus particular acts like murder, hoarding or starving themselves for the benefit of others then
choose to act upon their decision.
Dolphins hate sharks. Saving a human is often coincidence. The dolphins would do the same if it was a seal, a whale calf or a beach ball.
https://wildanimalscentral.com/are-sharks-afraid-of-dolphins/
https://seaworld.com/orlando/blog/10-reasons-sharks-have-dolphin-phobia/
10 Reasons Sharks Have Dolphin-Phobia