Yes. Someone who has earned a PhD holds a doctorate, and they are correctly called a doctor and may use the title “Dr.” Merriam-Webster defines a doctor not only as a physician, dentist, or veterinarian licensed to practice, but also as “a person who has earned one of the highest academic degrees (such as a PhD) conferred by a university.”
The academic meaning is actually the older one. The word comes from the Latin doctor, meaning “teacher,” and Merriam-Webster dates its first known English use to the 14th century in the sense of a learned or authoritative teacher. A PhD holder is not a medical doctor, though, and cannot treat patients unless they also hold a medical degree and a license.
Source: Merriam-Webster, “Doctor”
Image: UIUC doctoral regalia by Deliveryreviled, CC BY-SA 4.0, via Wikimedia Commons.