I was a UN peacekeeper in Western Sahara (MINURSO) back in 2009-2010, and I recall from the briefings that there are (at least) two distinct kinds of peace operations: peace keeping and peace enforcement, with the former requiring the explicit consent of the belligerent parties.
And the situation does not seem to have changed since then; quoting from the UN official page on Principles of Peacekeeping (emphasis mine):
These three principles are inter-related and mutually reinforcing:
- Consent of the parties
- Impartiality
- Non-use of force except in self-defence and defence of the mandate
1. Consent of the parties
UN peacekeeping operations are deployed with the consent of the main
parties to the conflict. This requires a commitment by the parties to
a political process. Their acceptance of a peacekeeping operation
provides the UN with the necessary freedom of action, both political
and physical, to carry out its mandated tasks.
In the absence of such consent, a peacekeeping operation risks
becoming a party to the conflict; and being drawn towards enforcement
action, and away from its fundamental role of keeping the peace.
Peace enforcement, on the other hand, does not require consent; from the relevant terminology page (where other peace activities are also briefly described):
Peace enforcement involves the application of a range of coercive
measures, including the use of military force. It requires the
explicit authorization of the Security Council.
It is used to restore international peace and security in situations
where the Security Council has decided to act in the face of a threat
to the peace, breach of the peace or act of aggression. The Council
may utilize, where appropriate, regional organizations and agencies
for enforcement action under its authority and in accordance with the
UN Charter.
See also the relevant lemma at the Encyclopedia Princetoniensis (again, emphasis mine):
Peacekeeping forces are normally deployed with the consent of the
parties to a conflict and in support of a ceasefire or other agreed
upon peace measures. [...] Peace enforcement refers to the use of military
assets to enforce a peace against the will of the parties to a
conflict when, for instance, a ceasefire has failed.
where, interestingly enough, it is also noted:
there is no explicit UN Charter basis for peacekeeping. UN peacekeeping emerged during the Cold War as a pragmatic, ad hoc response to conflicts between states where the warring parties were willing to accept the deployment of a neutral third party to help keep the peace and to prevent the resumption of fighting while diplomacy could be pursued to resolve the conflict.
Up until the 90's, and with the exception of the outlier case of the Korean War, UN peace operations were exclusively peace-keeping ones, thus requiring the explicit consent of the belligerents. In the 90's there were cases were the line was not so clear (most notably in former Yugoslavia, Rwanda, and Somalia), and (again, according to Encyclopedia Princetoniensis)
UN Secretary-General Boutros Boutros-Ghali, [...] in 1992 called for the establishment of “peace-enforcement units” to deal with challenges that exceed peacekeeping, but such units have never been created. National and multinational forces, such as those of the North Atlantic Treaty Organization (NATO), have sometimes been called upon instead to assist UN peacekeeping operations with enforcement.
The idea of peace enforcement operations did not sit well, and there were never widely adopted; AFAIK, all the current UN peace operations are peace-keeping ones, deployed with the explicit consent of the belligerent parties.
To summarize: it can, but it normally does not do so, and it has done so only in very few cases in the past.