There are different answers, depending on what you mean by "can".
A nation is sovereign, and so "can" do anything within its borders. The only way to force a country to do something is the use of force, i.e. defeat the country in a war.
But there are various rules, norms and expectations. Among these is the immunity for high ranking government officials, except in cases of war crimes and crimes against humanity.
It is the opinion of the International court of Justice that high ranking government representatives have limited immunity while they are in government. See, for example, the case of the issue of an arrest warrant against the minister of foreign affairs of Congo by a Belgian Magistrate. The ICJ decided that the arrest warrant "constituted violations of a legal
obligation of the Kingdom of Belgium towards the
Democratic Republic of the Congo, in that they failed to
respect the immunity from criminal jurisdiction and the
inviolability which the incumbent Minister for Foreign
Affairs of the Democratic Republic of the Congo enjoyed
under international law."
The best known situation is the case of Charles Taylor. Charles Taylor was President of Liberia during the conflict with Sierra Leone. In 2003 the Special Court of Sierra Leone (a body set up the UN) issued a warrant for his arrest and while Mr Taylor was at a meeting in Ghana, they served Ghana with the Warrant. The SCSL is a body that is capable of derogating the usual rights to immunity, in the case of war crimes and crimes against humanity. Nevertheless the Ghanaians did not act on the warrant and Mr Taylor returned to Liberia.