Imperator, the word (or example in the family of words) from which we get modern English's Emperor was uniquely a Roman title. Originally an acclamation of a great general by grateful troops it became an official part of imperial cognomena on the ascension of Vespasian but had been widely used by his predecessors in the purple to underscore their pre-eminent position as de jure commanders in chief of the Roman military. The term thus is very specific in its use, one that did not and could not extend to foreign powers. Caesar was another cognomen to show Imperial rank, and gave way to today's Kaiser and Tsar as well as other monarchical titles, but again was very much tied to the Roman Emperor and his family, nobody else.
So how did Rome refer to foreign leaders? Your answer in Latin is (almost) invariably rex. Tacitus, that paragon of Imperial prose, uses rex to refer to both the King of Parthia Vologeses (rex Parthorum Vologeses, Ann. 15.1.1) as well as Prince (rex Parthorum Pacorus, Hist. 5.9.6). The typical construction employs a rex followed by the genitive for the place or people over which the subject is ruler: rex Parthorum, rex Germanorum (Caes. Bel. 1.31), rex cupidi cogitantis (Go West, 1990).
There is some evidence for the incorporation of the greek βασιλεύς, King or more broadly ruler, into Latin texts but this survives to us in text form as quotation and discussion of such, for example Apul. Apol. 64.16, 64.17, 65.2. Whether in the common parlance of the mostly bilingual elite this was reflected is conjecture but not out of the question, particularly when dealing with who self-identified with βασιλεύς. The 'Persians' are an example of this. The Parthian Arsacids, the eastern rivals to Rome until A.D 224, used the moniker as seen in this coin of Phraates IV which can be seen to read ΒΑΣΙΛΕΥΣ ΒΑΣΙΛΕΥΝ on the reverse side (near the top). This meant King of Kings, a term for which the Sassanids used Shahanshah, and was a historic self-styling of the Achaemenid, Arsacid, and Sassanid Empires. The Latin equivalent, rex regum, appears twice that I can find, once each in Velleius (Hist 1.1.2) and the Historia Augusta (Val. 1.1.2). Velleius wrote roughly contemporary to Augustus, and the dating of the Historia is a complex mess but probably late 4th C. A.D so there really isn't much to say the term was in widespread use, if at all. Indeed, Velleius was referring to Agamemnon of Homeric fame and only the Historia to Shapur I, King of Kings and second ruler of the Sassanid Persian Empire. Cassius Dio, a Roman Senator of eastern origin who wrote a history in Greek in the early third C. A.D uses ὁ Καῖσαρ - Caesar - to describe Imperial rank, and then ὁ αὐτοκρατής - autocrat - for the political power of the Emperor.
The Romans were of course around for quite a while and this Sassanid Empire was more in the mold of an Achaemenid Persian Empire than the Parthians were. By the time of Justinian I (#makeromegreatagain) Greek was the lingua franca of the surviving eastern half of the Empire and as such we deal primarily in Greek language when it comes to historiography. Procopius is the prime example from the 6th century, writing a history of the wars of Justinian, whom he refers to as ὁ Ῥωμαίων βασιλεὺς - the Basileus (ruler, King, Emperor) of the Romans. Now how does he refer to the Sassanid Shahanshah? He does use τοῦ βασιλέων βασιλέως - genitive singular for the King of Kings - on occasion (Wars. 1.14.19) but far more common is the simpler ὁ Περσῶν βασιλεὺς. King of the Persians, same word and construction as the title of Rome's Emperor. When this shift occurred I can't say for sure, perhaps someone better versed in third to fifth century literature can help with that one.
So, to sum up: the Romans used a few terms over the course of their Empire and at the beginning had no shared word for Emperor. However by the end of the western Empire and as Greek took over as the official language we see a shift to a point at which Emperors and Shahanshahs shared a moniker, at least in the eyes of Greek speakers.
Source wise, this is an exegesis of primary texts and their respective Loeb translations.
Apuleius, Apologies.
Caesar, Gallic War.
Cassius Dio, Roman History.
Procopius, Wars.
Tacitus, Annals.
Velleius Paterculus, History.
Historia Augusta.
If Loeb is not accessible for you, to find Latin texts in Latin try The Latin Library a free online resource.
A freely available and extremely useful tool is PHI Latin texts, an online searchable database of ancient texts. Simply put in your term, e.g. rex and it tells you where it occurs, with further refinements to the search available. Invaluable for looking at word usage like this.
Edited thanks to the suggestions of /u/gallifreyan_pleb and /u/lcnielsen. Thanks for keeping me honest!