The tall fellow clinging to the rear of D.C. garbage truck No. 802 as it lumbered along the rainy streets of Anacostia yesterday morning wore crisp, new dark green overalls that broke elegantly over black dress boots with a spit-'n'-polish shine.

He arrived at one stop after the other trash collectors had gone. No problem. He merely ordered his chauffeur to drive to another part of town, where he joined a different crew that was still at work

The not-so-ordinary trash man was Mayor Marion Barry, who took a self-assigned morning of garbage duty yesterday to rub shoulders and pitch 20-gallon trash cans with some of his workers, who he said are often neglected -- and have sometimes been the target of his budget-cutting proposals. The mayor invited the city hall press corps to come along for the ride.

"This isn't political, because I'm not running for anything," Barry said, as he took a breather.

The mayor trooped through back alleys to retrieve mounds of refuse guarded by barking dogs. He quickly learned the difference between thick garbage bags and think ones; a thin one burst, splattering coffee grounds, soggy paper and orange guck at his feet. Barry scraped ineffectually at the mess with a piece of cardboard until a real garbage collector cleaned it up. It was that kind of morning for the mayor.

Some old hands at the job, most of whom make $17,500 a year compared to the mayor's $64,200 annual salary, gave Barry something of a cold shoulder. t

"I figure he's out here to find out what's happening," said Bernard Briscoe, an eight-year veteran. "Why should I talk to him?"

At one point, 10-year veteran Harold Vaughn gave Barry an "A" for effort. "It's nice of him to come out and try," said Vaughn. "Can't everybody throw trash, you know. It's not as easy as it looks."

But then the regular trash collectors began looking at the clock, Barry's visit had thrown them more than an hour off schedule, lengthening their work day by forcing them to drive through heavy rush-hour traffic.

"He's just in my way," said William L. Cox, a trash collector for 24 years. "He's not capable of handling any trash, so what's he doing here?"

When Barry arrived to pick up Deloris Kennedy's trash, the middle-aged woman dashed out of her home at 720 Alabama Ave. SE to hug him.

But after Barry left, Kennedy was critical of the mayor's proposal last year to reduce trash collection in most areas east of the Anacostia River from twice to once a week -- a measure that Barry aides say may still be necessary because of the city's budget crisis.

"He's out here, but for how long?" Kennedy asked. "One day," she said, answering her own question.

The Department of Environmental Services, which oversees trash collection, has been a traditional Barry target for cutbacks. Garbage collectors packed a hearing last year at which Barry's proposed reductions in services were discussed. Barry plans to eliminate 206 jobs in the department this fiscal year and more in 1981.

Aides stated repeatedly that Barry had wanted to ride a garbage truck since he became mayor and was not trying to stage a political stunt or "media event," even though the mayor is being buffeted with criticism over his handling of the city's budget crisis.

Barry has said that his stepfather helped organize trash collectors in Memphis, Tenn., an anecdote that once prompted a union organizer here who was disgruntled with Barry's posture toward the trash collectors to tell the mayor he should listen more to his stepfather.

Barry said he intends to work with other city employes on their jobs, including fire battalion chiefs and police officers. Service cutbacks have been targeted in those areas as well, but Barry insisted yesterday that he was getting down with the troops to get away from municipal financial worries.