Is it necessary to be hosted in France to be high ranked on Google.fr ?

No, it is not.

If you have a domain in .fr your website will be automatically ‘connected’ to Google.fr even though it is hosted outside French territory.

There are many methods to geolocate a website. Via Google Webmaster Tools, for example.

It will also be important to get backlinks from the targeted country.

Some hosts offer to directly geolocate the IP address of a domain name.

SEOSoftware Oseox Monitoring