Yes, in fact, in his last years in Iran, Khamenei was the personal representative of the Supreme Leader, Ayatollah Ruhollah Khomeini, and served as the president of Iran's Supreme Council for the Cultural Revolution, a powerful body which oversees all of the country's educational institutions.
Unveiling the Life of Mir Asadollah Madani: A Revolutionary Iranian Politician and Shia Cleric