The Pentagon has a team of weapons specialists ready to go to Lebanon to assess that torn nation's military needs, officials said yesterday.

Lebanese President-elect Bashir Gemayel told Defense Secretary Caspar W. Weinberger during his visit last week that Lebanon wants to play a bigger role in stabilizing the Middle East but needs modern weapons from the United States to do so, according to officials familiar with the talks.

A first step will be the dispatch of the Pentagon team to Beirut to discuss with military leaders there the needs of the Lebanese army, navy and air force.

The ability of the Lebanese to produce some modern weaponry, perhaps under license from the United States, is expected to be assessed.

Pentagon officials said neither Gemayel nor his deputies presented a wish list of weaponry during Weinberger's visit last week, although both sides agreed that modernization of the Lebanese military is needed.

Weinberger's stated basic philosophy is that the United States needs as many friends in the Middle East as it can get. He has made a concerted effort in his 19 months in office to broaden relationships with Arab nations, as evidenced by his visits early this year to Saudi Arabia, Oman and Jordan. He has stressed in doing this that closer relations with those and other nations in the Middle East and Persian Gulf region do not signal a turn away from Israel.

Just as he did with Saudi Arabia, Weinberger is expected to try to formalize joint military planning with Lebanon. The idea is to go beyond what weapons should be bought and how the purchases should be financed to a broad effort to coordinate U.S.-Lebanese military actions designed to defend interests in the Middle East.

Joint planning can go forward without congressional approval, while weapons sales or grants are subject to congressional veto. The Pentagon, to avoid stirring up congressional opposition, is likely to start by recommending such noncontroversial weapons as armored personnel carriers for the Lebanese army, patrol boats for the navy and transport planes for the air force.

Gemayel, despite his immediate problems with reorganizing his nation's military and patching up the country, was portrayed as eager in his meeting with Weinberger to go beyond that and become a major player in implementing a postwar master plan for the Middle East. His attitude contrasted with Israel's flat rejection of President Reagan's latest Middle East proposals.