China has discouraged the use of foreign-made electronic devices by government officials for a decade. It has told agencies and state-owned companies to replace American computer servers and other devices with domestic ones. And officials frequently show off to Americans their phones made by Huawei, China’s cellphone giant.

Now, some employees of government agencies said they have received directives not to use Apple iPhones for work. Internet users in China also have been circulating accounts and screenshots said to contain notices to government employees and state-owned businesses ordering or urging them to adopt domestic brands of cellphones and computers for their work.

Chinese authorities have issued no public pronouncements about broader restrictions on iPhones. The suggestion that Apple could lose ground in the valuable Chinese market has pushed the company’s stock lower, and Apple’s most popular product has gotten snared in the persistent China-U.S. tensions over technology.

China’s censors, usually assiduous about controlling the flow of information on the internet, appear to have done little or nothing to stop the claims of restrictions, first reported in The Wall Street Journal.

Hu Xijin, the retired editor of a Communist Party-run tabloid and now a nationalistic commentator with 25 million followers, has written about them on his blog. “If this trend continues, the U.S. is likely to be the bigger loser,” Mr. Hu wrote on Weibo, a popular Chinese social media site. In a written reply to questions, Mr. Hu said that China has been forced by American policies to show greater “vigilance” about security issues.

On Sunday, President Biden said during a news conference in Vietnam that China’s plan to limit government use of “a Western cellphone” was evidence that “China is beginning to change some of the rules of the game in terms of trade and other issues.”

Some local and provincial employees, who make up the bulk of government employees in China, have denied being told of any ban. They have been targeted in previous efforts to discourage the use of Apple devices, notably after Edward J. Snowden, an American government contractor, released information in 2013 revealing American surveillance around the world.

The United States and China both have much to lose in a geopolitical fight over consumer electronics.

Apple products are more visible in China than products from Chinese brands like Huawei and Xiaomi are in the United States. But because Apple and many other consumer electronics manufacturers have moved much of their manufacturing to China, one of the largest categories of the American trade deficit with China is in smartphones.

The warnings come right after Huawei introduced a smartphone with high-quality cameras that is seen as an iPhone rival. The Huawei phone, the Mate 60 Pro, is the target of a U.S. review into whether it uses computer chips that were made with American technologies that have been embargoed for sale to China. Huawei has presented the phone as a domestic effort.

Gina Raimondo, the United States commerce secretary, visited Beijing and Shanghai last month and told Chinese officials that the United States would not pull back recent controls it placed on certain high-tech exports to China.

Duncan Clark, a specialist in China’s telecom sector and now the chairman of BDA China, an investment consulting firm, said he believed the restrictions were “an effort to raise the stakes and remind the U.S. of what it could lose” from continued geopolitical frictions.

Jean-Pierre Cabestan, a professor emeritus at Hong Kong Baptist University, had a similar assessment. “I think it’s a tit-for-tat reaction,” he said, to American efforts to discourage foreign governments from installing Huawei equipment in their telecom sectors, as well as moves by some U.S. states to restrict the use of TikTok, the social media app, by government employees.

The United States bans federal agencies from buying telecommunications equipment from Huawei and other Chinese manufacturers.

Mr. Cabestan said that the warnings in China appeared to be a security measure aimed at state employees, and not a broader effort to discourage sales in China of Apple devices.

Still, few American companies have more to lose than Apple from rising tensions between the world’s superpowers. China is the world’s largest smartphone market and the source of about a fifth of Apple’s revenue. Apple doesn’t break out how many iPhones it sells in China.

More broadly, Apple became the most valuable technology company by pioneering a business model built on China’s manufacturing expertise. The country’s giant work force inexpensively assembles the vast majority of iPhones sold around the world.

On Tuesday in California, Apple will reveal its newest iPhone at a highly choreographed event that is an annual rite in Silicon Valley, and the company will then start stocking its stores around the world with the new model. Increasing official Chinese resistance to iPhones has the potential to curb this year’s sales.

Apple, which didn’t respond to requests for comment, has not said anything publicly about the recent reports.

The iPhone has long been a status symbol among Chinese entrepreneurs and popular among consumers, particularly in cities. By contrast, government employees have made a point of showing off their Huawei phones in public settings.

Under pressure from the Chinese government, Apple has built an extensive data center in China, although it has said it continues to protect its customers’ privacy all over the world.

Some people who work in China’s central government said employees have been told to stop using iPhones. Others described a vaguer demand for officials to stop using foreign-brand phones and to use Chinese ones.

One message that circulated on WeChat, a ubiquitous Chinese social media service, cited a decision from a departmental leader that staff members were to be barred from using foreign-brand smartphones, laptops and other digital devices starting Sept. 7. The message said staff members were also prohibited from using these foreign-brand products for work in their own homes. Another message on WeChat said that staff members would be required to stop using iPhones by Oct. 1.

Discussion has appeared online for years about whether Chinese officials are barred from using iPhones, along with occasional denials of blanket bans. A Shanghai newspaper reported in 2014 that officials in that city were under pressure to abandon iPhones over security worries.

A researcher in a government-run research institute in Beijing, speaking on the condition of anonymity, said the drive to discourage the use of iPhones appeared to ripple from what Chinese officials and party newspapers have described as a strategy of “substitution for domestic products” in key technologies, which has picked up pace since last year. In a speech to senior officials in February, which was published in July, Xi Jinping, China’s leader, urged increased efforts to achieve self-sufficiency for China in scientific research and advanced technologies.

“We must go on the offensive for the national production of scientific and technological instruments and equipment, operating systems and basic software,” Mr. Xi said.

In recent weeks, China’s Minister of State Security has publicized cases that it said involved Chinese officials and other people in sensitive roles being recruited by U.S. intelligence agents. Earlier this year, Chinese government secrecy authorities warned about careless use of phones that could expose officials to hacking or leaking sensitive information.

Amy Chang Chien, Claire Fu and Li Yuan contributed reporting.