Like with many a thing in int'l law, opinions seem a bit divided.
It has sometimes been suggested that non-refoulement does not apply to acts
of extradition or to non-admittance at the frontier. In support of this suggestion,
reference has been made to comments by a number of delegations during the drafting process to the effect that Article 33(1) was without prejudice to extradition. It
has also been said that non-refoulement cannot be construed so as to create a right to
asylum – something that is not granted in the 1951 Convention or in international
law more generally. [...]
Rejection at the frontier
As regards rejection or non-admittance at the frontier, the 1951 Convention and
international law generally do not contain a right to asylum. This does not mean,
however, that States are free to reject at the frontier, without constraint, those who
have a well-founded fear of persecution. What it does mean is that, where States
are not prepared to grant asylum to persons who have a well-founded fear of persecution, they must adopt a course that does not amount to refoulement. This may
involve removal to a safe third country or some other solution such as temporary
protection or refuge. No other analysis, in our view, is consistent with the terms of
Article 33(1).
A number of considerations support this view. First, key instruments in
the field of refugee protection concluded subsequent to 1951 explicitly refer to
‘rejection at the frontier’ in their recitation of the nature of the act prohibited.
This is the case, for example, in the Asian-African Refugee Principles of 1966, the
Declaration on Territorial Asylum of 1967 and the OAU Refugee Convention of 1969. While, again, these provisions cannot be regarded as determinative of the
meaning of Article 33(1) of the 1951 Convention, they offer useful guidance for the
purposes of interpretation – guidance that is all the more weighty for its consistency with the common humanitarian character of all of the instruments concerned.
Secondly, [...] as one commentator has noted, in Belgian and French law, the term ‘refoulement’ commonly covers rejection at the frontier. [...]
I'm omitting here quoting in full a few weaker IMHO arguments from the piece. It goes on for a couple pages just on that angle, including e.g. a UNGA resolution that lists refoulement as just of the problems, and more broadly "calls upon all States to refrain from taking measures
that jeopardise the institution of asylum, particularly by returning or expelling refugees or asylum seekers contrary to international standards".
And (of course) according to an EP briefing:
There is no internationally agreed definition of the term 'pushbacks' in the area of migration.
The special rapporteur on the human rights of migrants at the United Nations Office of the High
Commissioner for Human Rights defines pushbacks as 'various measures taken by States which
result in migrants, including asylum-seekers, being summarily forced back to the country from
where they attempted to cross or have crossed an international border without access to
international protection or asylum procedures or denied of any individual assessment on
their protection needs which may lead to a violation of the principle of non-refoulement'. [...]
Although the ECtHR in N.D. and N.T. v. Spain found no violation of Article 4 of Protocol No 4 to the
ECHR, which prohibits 'collective expulsions of aliens', the Court stated that the prohibition of
refoulement includes the protection of asylum-seekers in cases of both non-admission and rejection at the border.
So at least the EU case law seems to lean towards considering non-admission as part of refoulment.
As for wars specifically, a 2012 paper notes that alas these don't entitle one to refuge except in some [later] treaties:
Given that draft texts of the Refugee Convention were sheltered and nursed in bloodied swaddling clothes on the battlefields of Europe until it became safe enough – and politically possible enough – in the scenic tranquillity of post-war Geneva in 1951, to transmute them into treaty law, one would think that the definition of refugee it adopted would have no difficulty in catering for risk of refoulement to situations of war and armed conflict. The drafters knew well that war or war-like situations had produced large numbers of bona fide refugees.
Yet from the outset there have been difficulties. At the Conference of Plenipotentiaries in 1951 there were many references to the drafters’ concern to avoid writing a ‘blank cheque’ that would leave their societies exposed to unknown and uncontrollable levels of migration in the future. And one of the best-known delegates, Neremiah Robinson, noted that the refugee definition did not cover all man-made events, and did not cover persons “fleeing from hostilities unless they were otherwise covered by Art 1 of the Refugee Convention”. And once the Convention entered into force – and even more so after the 1967 Protocol lifted its temporal and geographical restrictions – decision-makers have never found claims made by persons fleeing war and armed conflict plain sailing (By “decision-makers” here I include not just state officials of the various signatory countries but also UNHCR – which is still the body responsible for refugee status determination in over 70 countries – and judges of national tribunals or courts).
Epitomising the early approach taken to claims brought by persons fleeing armed conflict, the 1979 UNHCR Handbook adopted what may be termed an “exceptionality approach”. In the opening words of paragraph 164 it was stated that “persons compelled to leave their country of origin as a result of international or national armed conflicts are not normally considered refugees under the 1951 Convention or 1967 Protocol”, although it was also accepted that there were “special cases”.
There's then a bit mostly about civil wars, but intersting nonetheless, in the conservative approach taken by some Western courts:
The “first wave” of national judicial decisions on persons fleeing armed conflict in the late 1980s and 1990s, led by the Germans, Dutch, Canadian and United Kingdom (UK) courts, adopted an approach based closely on that taken in paragraph 164 of the 1979 UNHCR Handbook.
The Canadian Federal Court of Appeal in a case called Salibian v. Canada (Minister of Employment and Immigration) offered the following (somewhat equivocal) statement of principle:
[A] situation of civil war in a given country is not an obstacle to a claim provided the fear felt is not that felt indiscriminately by all citizens as a consequence of the civil war, but that felt by the applicant himself, by a group with which he is associated, or, even, by all citizens on account of a risk of persecution based on one of the reasons stated in the definition.
In 1995 the Federal Court appeared to resile even from that approach stating in Isa v. Secretary of State (Canada) that paragraph 164 of the 1979 Handbook showed that the 1951 Convention was not intended to protect civil war victims, even if the attacks upon them were racially motivated as otherwise “all individuals on either side of the conflict will qualify”.
Yet in both Salibian and Isa the underlying notion was that, to qualify as refugees, persons fleeing civil war had to show something over and above a fear felt indiscriminately by all citizens. And it was this same underlying notion that the UK House of Lords latched on to in Adan. The majority of the law lords endorsed the view of Lord Lloyd of Berwick that whilst the Refugee Convention did not exclude group persecution (claimants did not have to show that they were more at risk than anyone else in their group, if the group as a whole was subject to oppression), that did not “touch upon the more difficult questions which arise when a country is in a state of civil war; in the latter context fighting between the groups gives rise to a fear of death or injury or loss of freedom, but not of persecution”. Persons fleeing armed conflict needed to show they would be at risk of “differential impact” over and above the normal risks to life and liberty inherent in the ordinary incidents of civil war.
So, somewhat amusingly, Hamas members could claim refuge in Egypt based on that (above-average risk of being targeted), but most Gazans could otherwise not. (Egypt could still deny Hamas refuge under the exclusion clause for serious criminals though.)
But non-Western treaties tended to be more inclusive of war refugees:
Early judicial thinking was also clearly influenced by the fact that by this time two regions of the world had already adopted their own refugee instruments which had expressly chosen to provide a broader, more “armed-conflict friendly” (to use an oxymoron) definition of refugee than that given in the 1951 Convention – the 1969 Organization of African Unity (OAU) Convention Governing the Specific Aspects of Refugee Problems in Africa, Article 1(1), and the 1984 Cartagena Declaration on Refugees, Conclusions III (3).
Article 1(2) of the OAU Convention expressly supplements Article 1(1) (modelled closely on Article 1A(2) of the 1951 Convention), stating as follows:
The term “refugee” shall also apply to every person who, owing to external aggression, occupation, foreign domination, or events seriously disturbing public order in either part or the whole of his country of origin or nationality, is compelled to leave his place of habitual residence in order to seek refuge in another place outside his country of origin or nationality.
Although the precise terms “war” or “armed conflict” are not used, this provision is heavily slanted towards inclusion as refugees of those fleeing armed conflict. “External aggression” covers, of course, the use of armed force by a State against the sovereignty, territorial integrity or political independence of another State – i.e. (in broad terms) international armed conflicts. By identifying “occupation” and “foreign domination” and “events seriously disturbing public order” as separate protection-conferring situations, the drafters had very much in mind the on-going armed conflicts being waged in a number of African States between liberation fighters and colonial powers or other occupiers.
The Cartagena Declaration’s drafters were even more concerned to ensure their regional definition of refugee embraced those fleeing armed conflict and generalised violence, stating that:
The definition or concept of a refugee to be recommended for use in the region is one which, in addition to containing the elements of the 1951 Convention and the 1967 Protocol, includes among refugees persons who have fled their country because their lives, safety or freedom have been threatened by generalised violence, foreign aggression, internal conflicts, massive violations of human rights or other circumstances which have seriously disturbed public order.
And then
Significantly, within Europe, starting with various non-binding resolutions between EU Member States, progressing to the Temporary Protection Directive and culminating in the Qualification Directive, reform to ensure international protection for persons fleeing armed conflict was effected, not by including any specific criteria relating to them in the definition of persecution, but by dealing with them in the context of extra-1951 Convention “subsidiary protection”. Thus Article 15(c) of the QD provides that one of the three categories of serious harm concerns: “(c) serious and individual threat to a civilian’s life or person by reason of indiscriminate violence in situations of international or internal armed conflict”.
So, basically, the EU invented a new legal category of protection ('subsidiary protection') for war refugees, apart from the 1951-style refugees.
Needless to say though, none of those treaties providing status for war refugees apply to Gaza or Egypt.