WASHINGTON (AP) _ Nicaraguan resistance forces recently received a shipment of 10,000 Polish- made AK-47 rifles as part of a weapons deal worth an estimated $6 million, U.S. officials say.

According to one official, the shipment was sent from the Bulgarian port of Burgas and reached the resistance forces via a Latin American country hostile to the leftist Sandinista government. The country was not identified.

The official said the transaction was authorized by Polish authorities in a desperate bid to obtain sorely-needed foreign exchange. But other officials expressed skepticism that the Warsaw government would ever consent to such a deal.

As a member of the Warsaw Pact, Poland has given enthusiastic support to the Sandinista government and welcomed Nicaraguan President Daniel Ortega as a guest of honor at ceremonies last May commemorating the 40th anniversary of the end of World War II.

According to one official, Poland would never consider selling weapons to the contras because the Soviet Union, Poland's chief patron, would not permit it.

All of the U.S. officials who commented on the story spoke on condition of anonymity. The State Department and the Central Intelligence Agency declined comment.

A Polish Embassy spokesman, Andrzej Dobrzynski, dismissed as ''rubbish'' any suggestion of Polish government involvement in aiding the contras.

''It is so preposterous, it is undignified even to deny it,'' he said.

A U.S. official suggested that the weaponry might have been intended for a country friendly to Poland but was diverted by intermediaries to the Nicaraguan rebels.

Such diversions are not uncommon in international weapons trades. The United States itself was victimized two years ago when 87 Hughes helicopters were illegally sent to communist North Korea by a West German firm.

The most senior official contacted by the Associated Press said the weaponry reached the contras six weeks ago with the foreknowledge of Polish authorities.

''They are doing what is necessary to get cold cash,'' the official said, noting that Poland has a severe foreign exchange shortage. He said Poland probably received between $150 and $200 for each rifle. All were in mint condition, he said.

Poland has been attempting to reach agreement with its western creditors on rescheduling its foreign debt, which stood at $26.8 billion at the end of 1984 and reportedly is growing at an annual rate of $1.3 billion.

A Polish economic analyst, Jacek Mojkowski, wrote in a Warsaw newspaper in July that Poland's exports to the West totaled $5.8 billion last year, about half of what was needed to meet its debt payments.

U.S. officials said the acquisition of the AK-47s is a reflection of the skill the contras have shown in overcoming the May 1984 cutoff in CIA funding.

According to one official, contra troop strength has reached 21,000 and is increasing by between 150 and 200 a week. The official added that the rebels have sufficient equipment to outfit 35,000 insurgents.

Adolfo Calero, head of the largest rebel group, the Nicaraguan Democratic Force, said recently $15 million has been raised from outside sources, mostly private groups in the United States, since Congress cut off covert U.S. aid.

Nicaraguan Ambassador Carlos Tunnermann has said the rebels do not pose a threat to the Sandinista government because they have not been able to hold a single Nicaraguan town for a single day since the insurgency began almost four years ago.

He also has said that 1,200 rebels have laid down their arms in response to a government amnesty program.