It's an election year, and Democratic and Republican leaders in Congress are putting a high priority on anti-drug legislation. But their major problem is how to fund the battle.

"Both political parties are going to be scrambling to pose as Mr. Drug Buster for the next six months," said Rep. David Obey, chairman of the House subcommittee on foreign operations."There's a tendency to pose for holy pictures in election years on drugs and then forget about the blasted issue next time 'round," complained Obey, D-Wis.

The Senate has struck first, going on record earlier this month 93-0 in favor of bypassing Congress' spending-cut promises to allow $2.6 billion in new drug programs. Indications are that the envisioned drug bill will be timed to hit the Senate floor in September for maximum election impact.

The House voted to stay within current overall spending guidelines. But its Democratic and Republican leaders have each ordered up their own drug bills, with public release expected in the next few weeks.

"We're hoping Republicans and Democrats will join together and we'll have a bipartisan drug bill," said House Speaker Jim Wright, D-Texas.

Rep. Bill McCollum of Florida, chairman of the Republicans' task force, agreed. But containing the cost will make it tough, he said.

"There will be, for anyone, a very limited amount of resources," he said. "They are going to be meager compared to all the ideas there are to spend them."

The Senate bill, introduced by Sens. Dennis DeConcini, D-Ariz., and Alfonse D'Amato, R-N.Y., would provide big budget increases for federal law enforcement agencies and grants to local police.

About a fourth of the money would go toward efforts to reduce demand in this country through treatment centers and drug education.

The House bills will carry those options and more.

Wright has asked committee chairmen to come up with a comprehensive package. It will almost surely be more expensive than whatever the House Republicans propose, especially in aid to local governments

and police.

Liberals last week were looking at cutting military spending to pay for it.

An amendment was being consid-ered for the Pentagon bill now before the House that would cut funding for the Star Wars missile defense system and transfer it to the anti-drug-import efforts.

Rep. Tony Coelho, D-Calif., the third-ranking Democrat, acknowledged the Reagan administration might consider that funding strategy as backing away from Pentagon spending agreements made last fall. But, he said, "The public has their priorities the same as we do."

Rep. Charles Rangel, D-N.Y., the chairman of the House select narcotics committee, would like to also include money to fight AIDS among drug users, and would support expanded use of the U.S. military to help other nations control their drug production, according to spokesman Bob Weiner.

"One thing we don't want is the death penalty," he said, or penalties on users that would overload prisons. Weiner said Rangel's proposal would be about the same cost as the Senate plan.

Republicans are looking at stiffer penalties for drug offenders, including capital punishment for dealers involved in deaths and proposals to cut demand with emphasis on what they call "user accountability." What form that will take is still unclear, as jail terms must be weighed against problems of prison overcrowding.

The GOP lawmakers, who two years ago opposed creation of a drug "czar" to coordinate federal efforts, may now favor one. They were also examining drug testing and related proposals to force anti-drug action by local governments and businesses that get federal money.

Both the House and Senate are expressing impatience with the cooperation of other countries.

The Senate has voted overwhelmingly to impose sanctions against Mexico for not doing its share to help the United States fight the flow of drugs across the border.

The House Foreign Affairs Committee, meanwhile, has recommended similar action against Peru, Bolivia and Paraguay.

Neither of those pieces of legislation is expected to reach the president's desk. But with the White House at stake this year some sort of drug legislation including international enforcement is expected to emerge before Congress quits in October for the campaign trail.

Ann B. Wrobleski, assistant secretary of state for international narcotics matters, told Obey's subcommittee the administration was expecting Congress to take action on drugs before the election.

"Drugs . . . is a cyclical issue," she told a House appropriations subcommittee, "When the drug bill is on the floor, we're going to have an orgy of amendments of people out-narcing each other."

Rep. Jerry Lewis of California, who is helping to draft the GOP proposal, agreed. "It's very clear that in the months ahead Congress will be right in the middle of this business," he said.

Rep. James Traficant, D-Ohio, told the House last week that Congress needed to take drastic action, including the death penalty for dealers and use of the military.

"Too many politicians make hay with drugs around here, and the drug dealers just keep making money," he said.