The federal deficit cast a long shadow over the National League of Cities meeting here today as urban leaders urged President Reagan to name a bipartisan commission to devise a plan to cut the deficit.

Setting aside their concerns about possible further reductions in urban aid programs, the league's resolutions committee called the deficit "the most urgent priority confronting the nation." The committee also urged reductions in middle-class benefit programs and tax breaks for the affluent.

But the same contradictions that have limited congressional action on the deficit also were evident among the 3,000 delegates who gathered in the Hoosier Dome, this city's $78 million symbol of public-private initiative. While one league committee was denouncing the deficit, other panels were proposing increased federal spending on job training, mass transit, education, nutrition and the homeless.

Indianapolis Mayor William H. Hudnut III (R), who sponsored the call for a commission on the deficit, said he doubts that the White House will adopt the idea. But he maintained that such a panel "might be a way beyond the impasse" and could dispel "the simplistic notion that we'll just outgrow the problem, or cut the fat out of the budget or cut out urban programs."

Others were less enthusiastic. "I have some problem with government by commission," said Colorado Springs Mayor Robert Isaac (R).

The league's board of directors also criticized a draft Treasury Department study that projects a $65 billion annual surplus for state and local governments by 1990. The board said the study, which some officials fear could be used to slash aid to localities, uses a "seriously flawed" approach that fails to account for growing local needs.

"We're not exactly rolling in dough," said New York City Council President Carol Bellamy (D). "Cities have been knocked down and it's taken us four years to pull ourselves up."

Much of the talk here focused on the need for federal tax reform. League President George Latimer (D), mayor of St. Paul, Minn., noted that $1.2 billion in mortgage tax deductions were used for vacation homes this year.

"If we had gone to the Congress and said we need a billion-dollar program to take care of the homeless, do you think they would have listened to that demand?" Latimer said.

Others offered their own targets for reform, with Hudnut suggesting cuts for millionaires who receive Social Security and Isaac complaining about federal pension plans. But officials were just as quick to argue for the protection of their own sacred cows, such as tax-exempt municipal bonds.

The resolutions committee spent much of its time debating the relatively obscure funding formula for urban development action grants, which many Sun Belt cities argue is unfairly tilted toward such older northern cities as New York and Baltimore. The panel urged that a third of the $440 million program be set aside for cities that the program defines as less distressed.

On a lighter note today, Hudnut, who lured the Colts from Baltimore to this domed stadium, gave Baltimore City Council President Clarence (Du) Burns two free tickets to Tuesday's Indiana Pacers basketball game. "This is in payment for the Colts," Hudnut said.

"I feel cheated," replied Burns, managing a smile.