Rep. Charles F. Dougherty, the only Republican Philadelphia has sent to Congress in more than two decades, is thinking of becoming a Democrat.

One of two Republicans who voted against President Reagan's final budget bill last summer, Doughtery said yesterday he "isn't happy with the effect a lot of his the president's programs are having on cities."

He added that he has been urged by a group of Philadelphia labor leaders, led by local AFL-CIO President Edward Toohey, to make the switch. Dougherty has long enjoyed labor support.

The two-term congressman, a maverick who has continually been at war with the local GOP organization in Philadelphia, said he will meet with national Republican leaders over the next few weeks before making a final decision. He plans to have lunch Monday with Transportation Secretary Drew Lewis, a power in Pennsylvania politics, and the administration's special trade representative, William Brock, the former chairman of the Republican National Committee.

"They are going to have to convince me that they want a viable Republican presence in urban America," he said. "If they do, fine. If not, I may be a thick headed Irish marine, but I'm not going to commit political suicide."

Dougherty's district, which is more than 2-to-1 Democratic, is dominated by Catholics, Jews, and blue- and white-collar union families. Despite its registration, it gave Reagan a 10,000-vote margin of victory in 1980, and Dougherty a 50,000 margin. Indeed, Dougherty's hardest political fight that year was a squeaker he won against a primary opponent endorsed by the local GOP, and some observers speculate he fears more intra-party bloodletting in 1982.

Though Dougherty denies any immediate interest in running for mayor, many local political observers are convinced that job is his long-term career ambition. If so, it would make sense to change political stripes in a city that is more than 4-to-1 Democratic.