President Reagan and NATO's new Secretary General Manfred Woerner on Friday discussed the thorny problem of sharing the alliances's costs and burdens, an issue one top aide said is at "the top of the list" for the pact's members.

"I feel confident this alliance has the strength, courage and imagination to overcome our difficulties," Woerner told reporters after he emerged from his half-hour meeting and hourlong lunch with the president in the White House."The president mentioned the American interest . . . of his administration, of Congress, in a more equitable burden-sharing and I told him that the alliance takes this issue very seriously. We are working at it," Woerner said.

A chorus of election-year unhappiness has been voiced in Congress due to the disproportionate share the United States bears for forces in allied nations, whose post-World War II economies have boomed and whose companies now compete on the international stage with American firms.

As a message to the allies, the Senate overwhelmingly approved a Pentagon spending bill last month that included restrictions on spending for American troops overseas. Under the plan in the bill, U.S. allies would have to pay for the American troops if the cost rises above the 1988 level.

Woerner, who said he was optimistic about the future of the North Atlantic Treaty Organization, said he believed the alliance will make progress on the cost issue. But he also warned that the question can't be reduced to financial considerations alone.

"We shouldn't treat it in a controversial way, we should look at it as an alliance task," he said. "It's not a confrontation between the United States and the rest of the alliance. It's a common task of NATO as an organization and an alliance."

Assistant Secretary of State Rozanne Ridgway, who briefed reporters following Woerner's visit, said of the burden-sharing question that "everyone agrees that it's a subject that has to be at the top of the list."

She noted that Woerner, during his meetings earlier this week with Secretary of State George P. Shultz and Secretary of Defense Frank C. Carlucci has "given it his personal priority."

"On both sides of this conversation (there is) a conviction that this discussion has to be an intra-alliance discussion, that it cannot become an us-vs.-them, a U.S.-vs.-all-others kind of discussion," Ridgway said.

The State Department official said Woerner and Reagan did not discuss the topic in great detail, but she added that Woerner is "pressing ahead" with a study of the issue.

The official said that the NATO visitors did report that they were "struck" by the attention the issue is receiving in the United States. "It is the kind of question (that) if non-examined, can become divisive and no one wants that to happen," Ridgway said.