The Competition and Markets Authority (CMA) said the companies may have needed to issue refunds for flights that took place but were not allowed for non-essential travel.
The watchdog will be writing to both airlines as part of an investigation.
During the pandemic BA offered vouchers or rebookings, while Ryanair provided the option to rebook on flights that operated but should only have been used for essential travel, the CMA added.
Crofters Hotel and wedding venue in Garstang shuts down to make way for 66-bed care home
Ice cream sales 'double' at Lancashire-based firm as heatwave hits UK
Evans Cycles: national bike firm opens second Preston store to power cycling boom in city
New Preston Home Bargains opening date confirmed
Podcaster master: Lancashire radio entrepreneur tapping into £46m podcast market with new business
BA said it offered refunds for all flights that were cancelled.
Legally, customers are entitled to a cash refund within 14 days.
The watchdog said: “The CMA is concerned that, by failing to offer people their money back, both firms may have breached consumer law and left people unfairly out of pocket.
“It is now seeking to resolve these concerns with the companies, which may include seeking refunds, or other redress, for affected customers.”
CMA chief executive Andrea Coscelli added: “While we understand that airlines have had a tough time during the pandemic, people should not be left unfairly out of pocket for following the law.
“Customers booked these flights in good faith and were legally unable to take them due to circumstances entirely outside of their control. We believe these people should have been offered their money back.”
The agency added that it should not be assumed either airline has broken the law.
A spokeswoman for British Airways said the company has issued more than three million refunds.
She added: “We continue to offer highly flexible booking policies at the same time as operating a vastly reduced schedule due to Government-imposed travel restrictions, and we have acted lawfully at all times.
“It is incredible that the Government is seeking to punish further an industry that is on its knees, after prohibiting airlines from meaningful flying for well over a year now.
“Any action taken against our industry will only serve to destabilise it, with potential consequences for jobs, business, connectivity and the UK economy. ”
It comes after the CMA launched enforcement action against several package holiday firms, forcing them to agree to offer cash refunds to customers.
Last month, package holiday firms Teletext Holidays and Alpharooms agreed to hand back £7 million to customers who saw their holidays cancelled due to the Covid-19 pandemic.
It follows similar agreements made by LoveHolidays, Lastminute.com, Virgin Holidays and Tui UK, after thousands of customers complained that the companies had failed to refund them for cancelled trips.
The travel sector has been one of the hardest hit during the pandemic and has faced the most scrutiny from the CMA, which wrote to more than 100 firms reminding them of their responsibility to process all refunds within 14 days by law for any cancellations.