About 20 conservative and moderate House Democrats, upset by the chamber's recent rejection of aid to "contra" rebels fighting Nicaragua's government, have drafted legislation to give the insurgents $14 million in humanitarian assistance this year.

Conceding that some form of nonmilitary aid is likely to pass, House Democratic leaders said yesterday that they will try to curtail any aid package presented for a vote and will press strongly to continue restrictions prohibiting use of U.S. funds to support military or paramilitary operations in Nicaragua.

"We're in a damage-limiting situation," one Democratic member said, adding that the leadership appears unlikely to offer an aid alternative but instead will react to any aid proposal by offering amendments.

House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) again acknowledged that Nicaraguan President Daniel Ortega's recent visit to Moscow appeared to erode support for the House position of not aiding the contras. But he said the visit "does not justify an American attempt to overthrow the government of Nicaragua. It does not justify aid to the contras."

In Madrid yesterday, President Reagan, responding to O'Neill's comment Monday that many Democrats had been "embarrassed" by Ortega's trip, said, "I think there are some people who are having second thoughts and discovering they are victims of a disinformation campaign."

The legislation being drafted by the conservative and moderate Democrats would give the rebels $14 million through the Agency for International Development (AID) only for nonmilitary or nonlethal purposes.

It also would urge Reagan to resume talks with Nicaragua and to pursue diplomatic and economic steps to pressure the leftist Sandinista government to begin talks with the rebels.

It would not alter the current prohibition against use of U.S. funds for military or paramilitary operations in Nicaragua. That is known as the Boland amendment after its original sponsor, former intelligence committee chairman Rep. Edward P. Boland (D-Mass.).

The new legislation was drafted by Rep. Dave McCurdy (D-Okla.), an intelligence committee member who has been working with the House GOP leadership on the bill.

Republican sources said that, depending on the proposal's final form, House Minority Leader Robert H. Michel (R-Ill.) and intelligence committee member Dick Cheney (R-Wyo.) might sign onto it.

The Republicans have said they would like to excise the Boland language, however, and the White House feels strongly about continuing funding of the contras through the Central Intelligence Agency.

In addition, some Republicans have sought language that would indicate an intention to provide military funds for the contras, possibly next year.

McCurdy said he plans to introduce his measure as a separate piece of legislation today but is likely to offer it as an amendment to any related legislation, such as the foreign aid bill or a 1985 supplemental catchall spending measure, presented for a vote in the next few weeks. Republicans are looking at those same bills for possible amendments.

McCurdy said most Democrats cosponsoring his bill voted as he did two weeks ago against a GOP proposal that would have provided humanitarian assistance to the contras.

They have said they did so because they thought a Democratic leadership alternative providing assistance to refugees outside Nicaragua and to countries involved in a regional peace treaty would pass.

But the GOP proposal narrowly was defeated, and the Democratic alternative was accepted but then defeated when Republicans and liberal Democrats voted against it for different reasons. The House was left with no aid package.

Sentiment among many moderate and conservative Democrats for some form of aid has been building since and was strengthened by Ortega's trip to Moscow. Two liberal Democratic lawmakers visited Nicaragua last weekend and conveyed Congress' growing concern about Ortega's visit.

One, Rep. George Miller (D-Calif.) is a strong opponent of any aid to the contras.

He said it was unclear from discussions there whether the government would be willing to take public steps toward democratic reforms that many members of Congress have said they believe would be necessary to forestall a vote to provide aid.