Mayor Marion Barry, hopping aboard a police helicopter while dozens of his top aides bumped along in a rented bus, traveled to Loudoun County yesterday for a two-day management retreat -- the second such gathering in five months for District officials.

Even as the officials checked into the sprawling Xerox training center just east of Leesburg, there was confusion over how the retreat came about and who was to pay for the event, which is also being attended by the mayor's wife Effi.

The mayor's office announced on Thursday that Xerox would pay for the entire conference, except travel. After media inquiries, the city said yesterday that it would pay for the cost of meals but that Xerox would provide the facility free.

Late yesterday, John C. White, the mayor's press secretary, said he had been misinformed and that the District would be billed for all costs at the center -- meals, beverages and accommodations for the Barrys and about 44 city officials.

Although specific costs could not be determined, a center brochure said the usual government rate is $74 a person a night, including meals, access to conference rooms and college-style dormitories in which participants have single-bed rooms and share a bath with one other person.

City officials have said the police helicopter, with a two-person crew, costs from $700 to $800 an hour to operate. The cost of the rental bus could not be determined.

White, the mayor's press secretary, said Barry used the helicopter rather than his official car because he wanted to be able to return quickly to the city, if necessary.

"We are out here to try to learn something," said White, adding that District residents would be the ultimate beneficiaries of improved management techniques learned by the officials.

Barry held a similar conference for about 60 officials May 1 in Berkeley Springs, W.Va. One city official suggested the District chose the Xerox center because it was closed off from reporters who had staked out the West Virginia retreat.

Although White said Xerox officials had approached the city about using the facility, a Xerox official in New York said "emphatically the city approached Xerox."

Theodore Thornton, director of personnel for the District, said yesterday that the decision actually was a combined effort and that he plans to call on other corporations to help train city officials.

The dispute over what, if anything, the city would pay, was cleared up, according to a District government source, when the Xerox officials were called by a Washington Post reporter and became alarmed over potential adverse publicity.

"Xerox was worried that it looked bad," said one city aide familiar with the decision. A local Xerox manager apparently approved the free use of the training center without checking with corporate headquarters, according to the city aide.

A Xerox spokesman in Rochester initially said yesterday that Xerox had planned this summer to charge the city. He called back later to say that the decision to charge had been made within the previous 24 hours.

Xerox officials said the company does business with the city, and considers the District "a good customer."

"There is no connection between the volume of business the district does with Xerox and this training session," White said.

The Xerox spokesman said the District officials would participate in a "leadership through quality" seminar that the corporation gives its own employes. A regular cabinet level staff meeting is scheduled for Saturday before the officials return to the District Building about 3 p.m.