The Carter administration struggled with itself yesterday in trying to decide whether to give its official blessing to a congressional resolution that states the United States would consider an armed attack on Taiwan "a danger to the stability and peace of Asia."

House Speaker Thomas P. O'Neill Jr. (D-Mass.) started the struggle off in the morning when he told reporters that Secretary of State Cyrus R. Vance had told him the resolution was "acceptable" to the administration.

O'Neil was speaking of a resolution sponsored by Rep. Lester L. Wolff (D-N.Y.) that is identical to a resolution being sponsored in the Senate by Sens. Edward M. Kennedy (D-Mass.) and Alan Cranston (D-Calif.).

The Kennedy-Cranston resolution also has the backing of congressional leaders, who see it as a vehicle for Congress to show its concern about Taiwan without undoing the administration's agreements with the People's Republic of China.

But President Carter, as recently as last week at a news conference, suggested he opposes any resolution dealing with Taiwan, saying, "I really don't believe that any resolution is needed."

At the White House yesterday, presidential press secretary Jody Powell fell back on Carter's statements when asked about O'Neil's comments.

"The concerns that some hope to deal with in a resolution are dealt with adequately in the legislation we have proposed and in our public statements," Powell said. "Any resolution that conflicts with the terms of our agreement with China is obviously unacceptable. What happens to something that falls between those areas, we'll just have to see."

But at the State Department, the view was slightly different. The department issued a statement strongly suggesting that the Kennedy-Cranston resolution, at least in its present form, is acceptable to the administration even if no one is willing to say that for the record.

"We do not see in the Kennedy-Cranston resolution anything which is basically inconsistent with our public statements or with our agreements with China on the establishment of diplomatic relations," a department spokesman said.

The statement added that "as long as a resolution does not attempt to change or undermine the nature of the basic understandings between the United States and the People's Republic of China, this would not cause insurmountable problems."

Summing up the State Department attitude toward the Kenndy-Cranston resolution, one official said, "We can live with it."

But the White Houst still wasn't buying this line. Late in the day, Powell's office issued its own statement, restating his comments of earlier in the day.

"The position of the administration is that a resolution is not necessary," the While House statement said. "Any resolution conflicting with the terms of our agreements with the People's Republic of China would be unacceptable. We have taken no official position on individual resolutions."