Rite Aid, which owns Bartell Drugs, filed for bankruptcy protection as it deals with losses and opioidrelated lawsuits.