Sure, but as you say later in your post there have been attacks over the last months, and in reality, years.
The President can act to respond to unexpected threats, but in the case of a chronic, ongoing situation like Soleimani the President is supposed to get authorization from Congress if he wants to take offensive action.
“if he wants to take offensive action”
I see it much differently; it would be defensive action, not offensive.
As President of this country and Commander in Chief, he has a moral obligation and responsibility to defend the U.S. from attacks.