"While embracing Modi's engagement, Pakistan must keep up its guard and retain the capacity for credible deterrence against India," Munir Akram said in an opinion piece in Dawn.
Akram said the invitation to Pakistan Prime Minister Nawaz Sharif and other Saarc leaders from Prime Minister-elect Modi to attend his swearing in Monday "was more surprising than his landslide electoral victory".
"Modi's invitation is an astute diplomatic move and a mixed blessing for the Pakistan prime minister," Akram said.
"Its rejection could have been construed as an unfriendly gesture and justification for future Indian belligerence.
"However, its acceptance, despite past and recent insults hurled at Pakistan, could cast this country in the role of an Indian satrap, more so if other South Asian leaders attend.
"The occasion could be utilized by Modi to set the bilateral and regional agenda. In any case, peace is not about to break out between Pakistan and India," he said.
Whatever Modi's reasons for inviting Sharif and other Saarc leaders, Akram said Islamabad must not needlessly confront New Delhi.
"It is in Pakistan's strategic interest to avoid a confrontation with India so that it can focus on promoting economic development, putting down the (Taliban) and dealing with the transition in Afghanistan," he said.
But in New Delhi, Sharif "will need to ensure India's respect for Pakistan's sovereignty and its national interests," Akram said.
"Pursuing economic cooperation and trade wherever this is beneficial for Pakistan is a legitimate aim. But this will not in itself assure peace and stability.
"Kashmir remains a time bomb in Pakistan-India relations and requires an equitable solution."