President Reagan moved yesterday to mollify the housing industry and state and local officials who are increasingly fearful that he is going to eliminate the largest programs of aid to cities and slash back federal support for housing.

The president ordered changes in regulations governing pension funds that could free as much as $20 billion for investment in residential construction, a move praised by major elements of the housing industry.

He also pledged not to phase out the $4.6 billion federal revenue sharing program until states and cities have an alternate source of funds. He told local officials at the White House that he is not committed to Office of Management and Budget proposals that would eliminate the community development bloc grant and Urban Development Action Grant programs.

Reagan did not promise to block the OMB proposals, but he emphasized that they are only recommendations. They will be discussed further with officials of the Department of Housing and Urban Development and Reagan's chief White House advisers, according to Richard Williamson, the White House liaison with cities and states.

Word of the OMB plans had stunned local officials around the country and brought a wave of criticism from Republican as well as Democratic state and city leaders earlier this week.

In his move to help the housing industry, Reagan told members of his housing commission that he has ordered the Labor Department to eliminate a prohibition against investing construction industry pension funds in residential mortgages. Such funds have about $20 billion in assets, the president said, according to a written summary of his remarks.

The prohibition had been designed to guard against construction industry officials who are trustees of pension funds funneling money to projects in which they have a financial interest. Intended to protect pension fund beneficiaries, it was part of the Employment Retirement Income Security Act of 1974.

The White House deputy head of policy development, Ed Gray, who announced the lifting of the ban, said he had not studied where construction industry pension funds are invested at present.

Reagan said the changes "are not intended to water down basic...prudent investment protections. Rather, they serve to demonstrate our commitment to eliminate barriers and unlock important new doors to prudent investment in the housing market."

The president's action brought immediate praise from the National Association of Home Builders, the International Union of Bricklayers and Allied Crafts, the Mortgage Bankers of America and other groups with a stake in the construction industry.

Reagan's announcement, attended by HUD Secretary Samuel R. Pierce Jr. and Labor Secretary Raymond J. Donovan as well as representatives of the housing industries, would go only so far in offsetting the impact of an OMB proposal to eliminate the Government National Mortgage Association by 1987.

Housing experts say elimination of Ginnie Mae also would end Federal Home Administration and Veterans Administration mortgages, which Ginnie Mae backs. It would take longer than five years to find a replacement for these sources of mortgage funds, they say.

In a separate meeting on problems of local governments, the president reiterated his promise not to phase out the $4.6 billion revenue sharing program until an alternate source of funds for state and local governments, already hurting because of earlier Reagan budget cuts, is available, Williamson said.

The local officials did not ask Reagan at what level he intended to maintain revenue sharing, Williamson said. As part of his Sept. 24 budget package Reagan proposed a 12 percent reduction in a wide range of programs, including revenue sharing. Williamson and other officials have said there may be a small increase in revenue sharing designed to compensate for cuts elsewhere.

Williamson said the president told the visiting presidents and executive directors of state and county associations that he understands that his policies have caused real dislocations. The local officials "expressed great concern over the OMB options," Williamson said.

Staff writer Sandra Evans Teeley contributed to this report.