Huawei, the Chinese telecom giant, is a source of national pride. Lam Yik Fei for The New York Times

BEIJING — The arrest of one of China’s leading tech executives by the Canadian police for extradition to the United States has unleashed a combustible torrent of outrage and alarm among affluent and influential Chinese, posing a delicate political test for President Xi Jinping and his grip on the loyalty of the nation’s elite.

The outpouring of conflicting sentiments — some Chinese have demanded a boycott of American products while others have expressed anxiety about their investments in the United States — underscores the unusual, politically charged nature of the Trump administration’s latest move to counter China’s drive for technological superiority.

In a hearing on Friday in Vancouver, Canadian prosecutors said the executive, Meng Wanzhou of the Chinese telecom giant Huawei, faced accusations of participating in a scheme to trick financial institutions into making transactions that violated United States sanctions against Iran.

Unlike a new round of tariffs or more tough rhetoric from American officials, the detention of Ms. Meng, the company’s chief financial officer, appears to have driven home the intensifying rivalry between the United States and China in a visceral way for the Chinese establishment — and may force Mr. Xi to adopt a tougher stance against Washington, analysts said.

In part, that is because Ms. Meng, 46, is so embedded in that establishment herself.

She is one of China’s most prominent businesswomen — well-traveled, fluent in English, the heir apparent to a global technology firm that is a source of pride for both ordinary Chinese and the ruling Communist Party.

She is also the daughter of the company’s legendary founder, Ren Zhengfei, who built the company after a stint in the People’s Liberation Army. That makes her corporate royalty in China — the equivalent of someone like Sheryl Sandberg, if Ms. Sandberg were also the daughter of an American tech pioneer such as Steve Jobs.

Now Ms. Meng is in custody, after being detained during an airport layover in Vancouver on Saturday, and the outcry has put the Chinese leadership on the spot. Mr. Xi faces competing pressures — to show strength, perhaps by retaliating against the United States, but also to limit the cost of rising tensions and the trade war with Washington on China’s ruling class.

“Her arrest will have phenomenal repercussions in China,” said Tao Jingzhou, a corporate lawyer in Beijing.

“The wealthy have already been worried for a long time about their safety and their wealth in America,” he added. “If the U.S. is going to pursue corruption and extraterritorial laws, that will increase.”

Though Mr. Xi’s status as China’s paramount leader is unchallenged, his management of the economy and relations with the United States had come under criticism before Ms. Meng’s arrest, with some blaming him as pushing overly ambitious policies that aggravated the Trump administration and provoked the trade war.

And the timing of Ms. Meng’s detention may mean more pressure on Mr. Xi. It occurred as he and Mr. Trump were discussing a truce in the trade war over dinner in Buenos Aires. Aides said Mr. Trump was unaware of the arrest at the time, but some Chinese are already saying the American side’s failure to raise it at the summit meeting amounted to a loss of face for Mr. Xi, and perhaps a deliberate attempt by hawks in Washington to embarrass China.

Others said Ms. Meng’s arrest would embolden those who have long suspected that the United States is determined to block China’s rise. “This will just confirm everyone’s worst suspicions about the U.S.,” said one retired businesswoman with family ties to the party leadership, speaking on condition of anonymity.

Deng Yuwen, a political analyst in Beijing, said conservative forces in the Chinese government and society could use Ms. Meng’s arrest…