Just do the classic developing country thing and charge non-french people significantly more. 2x the price if you live outside paris, 5x the price if you live outside of France, and 20x the price if you live outside the EU.
I wonder if the Paris city hall can do a rebate program of "Dear Paris residents, mail in your ticket stub and we'll give you a partial refund" - this is a first draft of an idea, it's flawed because it would lead to opportunistic Parisians asking tourists for their ticket stubs, and then telling the city hall that they visited the Louvre 30 times last month.
No, they can't, EU courts would strike that in a heartbeat.
Some time ago Germans tried to tax foreign drivers on their roads, so they introduced toll, nominally for all, but also lowered the same amount another car-related tax that was paid only by Germans. EU bodies saw through the scheme just fine and now they're on hook for returning the toll money to anyone still keeping the invoice/receipt.
Half yes, probably discarded, but the other half are in company books, because those were accounted as costs of operations. Even then, yes, probably worth it for the time.
There are only charging Germans right now. They wanted to extend that to foreigners, so if you wouldn't lower the tax that pays for this right now, you would charge Germans double.
Of course this is against the interest of other countries, which is why they prevented that, but it wasn't unfair or discrimination.
There's a significant ethical issue involved here though. Museums in former colonial nations frequently contain artifacts that were, ironically, stolen from other countries, often through violent means. Charging people from these former colonies to view their own national treasures is deeply problematic.