“The Secret Service does not determine who is invited or welcome at Mar-a-Lago; this is the responsibility of the host entity,” the agency said in a statement late Tuesday. “The Mar-a-Lago club management determines which members and guests are granted access to the property.”

The arrest of Ms. Zhang came against a backdrop of increasing interest in Mar-a-Lago in China, where advertisements on the internet and on social media sell invitations to the club, which also functions as a for-profit enterprise that rents itself out. The advertisements promise the prospect of rubbing elbows with the president and his associates at banquets, fund-raisers and other events. Access to Mar-a-Lago is highly prized in China, bestowing respect, influence and the allure of potential business opportunities.

After Ms. Zhang was stopped, she produced a copy of a Chinese-language invitation for the friendship event that was promoted by Cindy Yang, who had previously owned a string of massage parlors where the police shut down a prostitution ring in February. The authorities said the patrons included Robert K. Kraft, a friend of the president’s and the owner of the New England Patriots.

Ms. Yang, who is active in groups backed by the Chinese government and Communist Party, is no stranger to Mar-a-Lago herself. Last year, she attended a Trump fund-raiser at the resort and posed for a photo with the president.

Federal officials said they were still investigating Ms. Zhang and what kind of malware was on her thumb drive. It was not yet clear whether she was just a striver seeking selfies at the president’s resort or whether she had links to Chinese intelligence. Ms. Zhang’s lawyer did not respond to a request for comment.