A heated policy clash has developed between the State and Commerce departments over the foreign-policy implications of trade issues. The dispute was sparked by questions over the government's approval of the sale of electric-shock police batons to South Korea and South Africa.

The South Korean government has canceled its order for 500 of the batons, but a high-level review of this country's export approval procedures is under way, fueled by the revelation that the Commerce Department approved the sale of 2,500 batons to South Africa in April without consulting the State Department.

The issue highlights one of those gray areas of government policy making where different agencies can have different goals. The Commerce Department is supposed to encourage sales abroad and, under the Export Control Act of 1979, it has the authority to grant licenses for the sale of certain items. In cases where there are foreign-policy implications to a proposed sale, however, Commerce is supposed to consult the State Department.

Commerce has the final authority to approve export licenses, but these cases have prompted Congress to set hearings to review the process.

The batons are about the same size as a police nightstick, and give a non-lethal but painful shock. Human rights advocates say they often are used for torture or indiscriminately in crowd-control situations. Similar devices are used as cattle prods.

In the South Korean case, Commerce had sought the views of State. Although State objected, citing continuing questionable human rights practices by the South Korean government, Commerce approved it.

When protests developed, the license was put on hold. On Monday the South Koreans canceled the sale.

However, in the South African case, Commerce did not consult State. Paula Kuzmich of State's Human Rights Bureau said that, if State had been consulted, "We would have recommended denial. Through administrative inadvertence, the State Department was not asked for a recommendation."

Officials familiar with the case say a lower-level Commerce Department employe simply approved the sale without recognizing the foreign-policy implications and that it was not caught at the policy-review level.

Revelation of the sale comes at an embarrassing time for the administration, when it is trying to get the support of black African states for a settlement of the Namibian issue, the centerpiece of U.S. Africa policy under President Reagan.

"This will only feed growing perceptions throughout Africa and the world of the willingness of the United States to enter into a new accommodation with South Africa," Rep. Howard Wolpe (D-Mich.), chairman of the House Foreign Affairs subcommittee on Africa, said of the sale.

The State Department has embarked on what it calls a policy of constructive engagement toward the South African government, but the department's latest human rights report on South Africa makes it clear that that nation's apartheid policies continue to deprive blacks of basic human rights.

Wolpe wrote Commerce Secretary Malcolm Baldrige Monday, asking for a full explanation of the sale to South Africa, and is in the process of scheduling hearings, which very likely could cover broader issues of administration export policy.

The Korean sale also prompted a protest from Congress in the form of a letter signed by 19 members of the House criticizing the granting of the license as "clearly proscribed by . . . the Foreign Assistance Act."

". . . . Our security can hardly be aided by an act which increases anti-American attitudes of the people of Korea who struggle for democratic reform," the letter said.

Commerce Department officials have cited an earlier State Department approval of a sale of shock batons to South Korea in September, 1981, as a precedent for their decision, but it remains unclear why State's foreign-policy objections were rejected in the latest case.