As long as the airline did not provide at least 14 days’ notice and your flight is eligible under EC 261, the answer is yes—passengers can receive both compensation AND a refund. However, in order to receive the refund, airlines will often ask you to sign a waiver. Some waivers include a forfeiture of compensation clause, effectively making it impossible to also claim compensation. If you plan to file a claim, be sure to read the fine print on anything you sign.
Submitting claims They canceled my flight and refunded my money. Can I still claim?