Farm-state legislators desperate to help constituents on the edge of bankruptcy moved yesterday to take parliamentary hostages in both houses of Congress until an aid program is worked out with the White House and scheduled for a vote.

Senators from farm states were threatening to filibuster the confirmation vote on Edwin L. Meese III as attorney general. They and some House members also were considering tacking farm credit provisions onto an emergency bill the administration has requested providing aid for victims of the African drought.

The House Foreign Affairs Committee yesterday approved a $175 million authorization of emergency supplemental aid for drought-stricken African nations where thousands have died of famine. A House Appropriations subcommittee was expected to take further action today.

"We cannot wait," Sen. David L. Boren (D-Okla.) said for the farm state members in threatening to filibuster the Meese nomination. "We need action . . . in the next few days to avert disaster."

The filibuster threat provoked a testy response from Senate Majority Leader Robert J. Dole (R-Kan.), who warned his colleagues not "to play political games" over the Meese nomination.

He told the farm state legislators that if they continue to pressure him on farm aid by tying up the Meese nomination, "we may not get around to addressing the problem."

"I don't know of anybody who's got a solution," Dole said sarcastically, noting that Meese had been waiting a year for his confirmation as attorney general, while the farm problem had been around for 40 years.

Sen. Tom Harkin (D-Iowa) responded that some farmers in his state had been "waiting two to three years" for help from the government. He asked Dole earlier why it was more important to take up the Meese nomination rather than help farmers "who are going under."

"Do you have a bill you want to call up right now?" the Majority Leader shot back.

Harkin, a freshman Democrat, said he was prepared to write one on the spot if necessary.

Dole and Sen. Jesse Helms (R-N.C.), chairman of the Senate Agriculture Committee, met with Boren, Sen. J. James Exon (D- Neb.) and Sen. Alan J. Dixon (D-Ill.) just before the exchange on the Senate floor in an effort to head off the threatened filibuster.

The farm state legislators emerged to say that Dole and Helms had agreed to get the administration to "price out" various proposals for helping thousands of beleaguered farmers who face possible bankruptcy if they cannot get credit to help plant their spring crops.

"They're sitting on death row today," said Sen. David H. Pryor (D-Ark.).

The farm state senators have not agreed among themselves on a specific package to put to a vote, but some of them outlined key elements they would like to see in it. They include a spring advance on price-support loans that farmers normally qualify for in the fall, more loan guarantees, debt restructuring with lower interest rates, and greater leniency in dealing with the loans of hard-pressed farmers.

The administration has proposed an aid plan for farmers that the senators denounced as too little and too late. Angry senators said yesterday that it was time for President Reagan to get involved in the issue, rather than letting budget director David Stockman and Agriculture Secretary John R. Block speak for the administration.

Stockman offered an apology of sorts to the farm community yesterday, saying he had not meant in earlier comments to suggest that the credit crisis was the farmers' fault. But he insisted again that the government cannot bail them out, United Press International reported.

The farm state legislators said they would allow debate over Meese's nomination to begin but promised to filibuster if Dole tried to press for a vote.

Dole predicted that Meese would win confirmation easily, despite objections to his nomination by some Democrats.