In France the situation is somewhat complex. The overall answer is "yes". But hear me out.
Let me first spell out the theory. It is important to make the distinction between the diploma, the degree, and the title.
- At the end of a "doctorat" (PhD), you are awarded a PhD diploma, which confers you the university degree of doctor. For this you must write a research thesis. This is the fourth and highest university degree. (The other three degrees are, in order, baccalauréat = high school degree, licence = bachelor, and master, none of which grant a title).
- At the end of studies of medicine, you are awarded a State diploma of "doctor of medicine" (MD). However, this diploma does not confer the university degree of doctor. To obtain the diploma, you must write a "practice thesis" (thèse d'exercice), which is not at all like a PhD thesis (no requirement of originality, lasts a much smaller time – writing a bibliographical survey is sufficient to obtain it for example). This means that someone who "only" has a diploma of doctor must do an actual PhD in medicine before teaching in university, or doing medical research, and write an actual research thesis. (Hence some people are "double doctors", a title I just made up.)
On a PhD diploma it is explicitly written "The national diploma of doctor is awarded to XXX and confers the degree of doctor, to enjoy the associated rights and prerogatives". The part in italics is not written on diplomas for medical doctors.
Both diplomas give you the title of "doctor". By law, only these diplomas give you the right of using this title. So yes, certainly, a PhD holder has the right to be called "docteur". MD too. But no one else.
In fact, there is a famous story here. Someone got a "chargé de recherche" ("scientist") position at CNRS. This is somewhat prestigious in French academia, and very competitive. It is essentially a rank of "research-only associate professor". Then he wrote an article in a magazine, signing his name "Docteur XXX". A regional journal called him out on him, saying he was not a real doctor, but only a "mere scientist" (an inane statement once you know that a PhD is required to get this "scientist" position*). This eventually went to the approximate equivalent of the Supreme Court (Cour de cassation), and the regional journal was condemned for defamation of character in 2009. You can read more about it here (in French). In 2013, the law was changed to explicitly state that PhD holders have the right to call themselves and be called "doctor" in professional settings.
So unless you want to get sued and lose (and we don't do plea deals here), you better call PhD holders "doctor" if they ask for it in France.
Now there is the practice. As you know, in theory, practice and theory are the same, but in practice, they differ :)
In ordinary situations, only medical doctors are called "docteur". It is extremely rare for PhD holders to actually use the title, and then, only in writing (usually in very formal documents). I cannot recall ever hearing someone call a PhD holder "docteur", while I have heard it numerous times for medical doctors. I have a PhD since a few months ago, and only foreigners have called me "doctor". On doors, on faculty directories, on websites... nobody ever write "Dr X". It just doesn't happen.
So it is extremely unlikely that someone would insist that you call them "docteur" if they are not a medical doctor. (In fact even for a medical doctor it would be in bad taste for them to ask... anyway.) But if they do ask, you should oblige.
* Honesty makes me want to amend this a little. The French name for the position, "chargé de recherches", literally means "someone who has been tasked with research". It sounds a bit bad, because it makes it sound like the person in question is a mere subordinate who does as they are told and nothing else. As I said, it's actually a permanent, research-only position, and a very competitive one at that. It's the same kind of deal as "assistant professor", who are not the assistant of anyone nowadays but still have this somewhat bad-sounding title. (In the private sector, someone with the level of responsibility of an assistant professor would certainly have a grandiose title like "Team manager"... but I digress.)