Probably the best oportunity for that to happen is 1640, during the uprising of Els Segadors. Anyway, as more recent is the POD, more difficult is for a french Catalonia to have a "happy end". There is something that people often overlooks. If you want to find a place for Catalonia* inside France, you need to change France or Catalonia a lot. For starters, a region proud of his autonomy won't be never comfortable in a centralist state. So, Catalonia in the First Empire or in the IV Republic wouldn't be a good idea, besides the other practical problems stated by Yorel. Of course an option to avoid this questions is, as mentioned, West Francia retaining the Hispanic March, but many factors, from international politics to geography, were pushing towards the factual independence of the pyrenean counties.
*I mean Catalonia with its basic OTL indentitarian traits. Of course the territory itself can be in anyone's hands, the stones don't have cultural/political opinion.
Cheers.