President Reagan is likely to pull back from his 18-month-old threat to impose trade sanctions against Brazil for its laws restricting computer imports and foreign investment in high technology industries, administration trade officials said yesterday.

Brazil appeared to have forestalled the sanctions when its lower house of parliament, the Chamber of Deputies, approved legislation Wednesday night against piracy of computer software.

After postponing a decision twice, the administration has until Tuesday to decide whether to take retaliatory action against Brazil.

The Cabinet-level Economic Policy Council is expected to recommend today against imposing sanctions, largely because of the new software protection bill. But the council is expected to advise the president to keep his trade complaint alive to make sure that both houses of parliament approve the legislation and that Brazil deals with other high technology trade and investment problems.

While U.S. Trade Representative Clayton K. Yeutter praised Brazil's legislative action on the piracy law, administration sources said other problems remain -- chief among them are curbs on investments. But Brazil now says it will exhibit greater flexibility in allowing foreign investment in high technology industries.

The first test of that new flexibility could come soon, when Texas Instruments submits a $100 million investment plan to the government of President Jose Sarney.

Reagan threatened the sanctions in late 1985 when he reacted to computer industry complaints that Brazil's laws, designed to promote its domestic high technology industries, banned imports of certain American-made computers and failed to provide copyright protection for software developed by foreign companies.

The issue arouses nationalist feelings in Brazil and is interwined with that nation's ability to repay its heavy debt.

The atmosphere is so highly charged in Brazil that Sarney's government has asked that talks with the Reagan administration be held in third-party countries; Yeutter held his most recent meeting with Brazilian officials in Mexico City last week.

Sarney threatened to cancel his visit to Washington last fall unless Reagan agreed to postpone a decision on sanctions that was due in September.

U.S. officials said that Sarney was personally involved in pressing the parliament to pass the software copyright protection legislation. A draft of the bill was shown to Yeutter last week, sources said, and he brought it back for study by government experts in intellectual property protection.

While the draft legislation was deemed satisfactory, Yeutter reportedly told his Brazilian counterpart that the Reagan administration would not postpone possible retaliatory actions merely on the promise that the bill would be passed. Because of the time crunch, he agreed that no sanctions would be imposed if one house passed the bill before Tuesday's deadline and if prompt passage was promised by the other

"We have a winner here," Yeutter said yesterday. But he acknowledged that the Reagan administration is not totally satisfied with remaining limits on computer sales.

"Brazil has come a long, long way," he said. "Their position is substantially different from when this case was first begun."