House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) announced yesterday that the House will consider next Tuesday a resolution permitting President Reagan to keep U.S. Marines in Lebanon for another 18 months.

It was not clear whether the resolution would ease White House concern about a divisive congressional debate that could hamper administration policy in Lebanon.

At issue is a swelling demand in the House and Senate for invoking the War Powers Resolution, under which Congress would have 60 to 90 days to decide whether the Marines, four of whom have been killed near Beirut in the last two weeks, should be kept as a part of the multinational peace-keeping force in Lebanon.

The administration is confident that it will win substantial backing for its plans to retain the Marine presence as a symbol of support for Lebanese President Amin Gemayel's government.

But it is fearful of a congressional debate that might produce emotional rhetoric calling for withdrawal of the Marines or that could result in Congress setting specific limits on the Marines' stay.

In the administration view, such a debate might prove dangerous if interpreted by Syria, which is backing anti-Gemayel forces in Lebanon, as a sign of weakening U.S. resolve, encouraging Syria and its allies to continue attacking the Marines in hope of forcing their withdrawal.

That argument was pressed strongly yesterday by Secretary of State George P. Shultz, who met privately with senators for two hours, and by several other officials, including Gen. Paul X. Kelley, commandant of the Marine Corps, who testified publicly before the Senate Foreign Relations Committee.

All argued vehemently against setting any limit on the Marines' stay. Kelley asserted that "there is not a significant danger at this time in terms of imminent hostilities to our Marines," and Nicholas A. Veliotes, assistant secretary of state for Mideast affairs, said a limit would be "a grave error" that would encourage Syria "to wait for the time limit and influence American opinion through Congress."

However, statements by members of both houses indicated a strong feeling that Reagan is eliminating a congressional role in the Lebanon situation through his refusal to invoke the War Powers Resolution formally and that Congress, to protect its foreign policy prerogatives, must step in and take action.

O'Neill said that as the result of extensive consultations between congressional leaders and White House officials, the House Democratic leadership is preparing a resolution aimed at satisfying congressional opinion and permitting the Marines to stay for an extended period.

The tentative plan is for House Foreign Affairs Committee Chairman Clement J. Zablocki (D-Wis.) to introduce the resolution in his committee, perhaps as early as today, with the aim of reporting it out for a vote by the full House Tuesday.

As of last night, the tentative draft language would put Congress on notice as having determined that the president, in conformity with the War Powers Resolution, should have notified Congress that U.S. forces are involved in hostilities, thereby starting the clock on the 60- to 90-day period for their withdrawal. But the proposed resolution would authorize the Marines to remain for 18 months from the date of the resolution's enactment.

Congressional sources said 18 months should be enough time to ensure that Syria is well aware of U.S. resolve in Lebanon.

The proposed House version also would put fewer restrictions on the size and employment of the Marine force. The House language says only that the Marines should operate in accordance with the original mandate of the multinational force to lend confidence-building support to the Lebanese armed forces.

However, administration officials said they oppose language in the House proposal requiring an 18-month limit unless Congress votes to renew it. Instead, the officials said, the administration is negotiating with House leaders for language that would permit the president to make that determination after 18 months.

These officials, while reiterating that the administration would prefer no congressional action, said that, if the question of what happens after 18 months can be resolved to Reagan's satisfaction, he will probably agree reluctantly to support the House resolution in hope of forging a common front with Congress.