to offset something means to compensate for it, or to make up for something or counteract.
It is mostly used in technical language (carpentry, masonry etc.), and accounting (offset an account) as a verb or noun.
As a verb, it means: counteract (something) by having an opposing force or effect.
"the deficit has been more than offset by capital inflows" [google dictionary or whatever it's called.]
drift means: to vary or deviate from a set course or adjustment. transitive verb.
Merriam-Webster.
The announcement of the king's leaving would push the country off-course (the direction it was moving in or make it drift) as it would be left with no ruler. The minister wanted to counteract or offset that. That is, he wanted to correct the course (the deviation or drift from the course) the kingdom might move in. It is a maritime or navigation metaphor.
Ship's have courses and they sometimes drift off course due to wind, currents or inattention by sailors. When you drift off course,it has to be corrected by returning to the proper one.
Of course, it didn't work because there was about to be imam-led revolution in Iran.
offset the drift = counteract the possibility that the country would drift (move) off course.