The Regulation applies to any passenger
travelling to an EU member state on an airline based in an EU member state
if that person has:
a confirmed reservation on the flight, and
arrived in time for check-in as indicated on the ticket or communication from the airline, or, if no time is so indicated, no less than 45 minutes prior to the scheduled departure time of the flight
or
have been transferred from the flight for which he/she held a reservation to some other flight
unless
Except if the passenger is travelling on a free or discounted ticket not available to the general public, other than a ticket obtained from a frequent flyer programme.
To avoid conflict of law the EU Regulation allows a third country law to apply for flights departing from that country, even on EU airline. There are very few of those, although some EU airlines claim that, in the US, the DOTs Denied Boarding Compensation rules override Regulation 261.