By a vote of 12 to 8 a House Commerce subcommittee decided yesterday to require most owners who can afford it to insulate their homes up to federal standards before selling them, possibly starting in 1982.

The mandatory program is intended to take effect by the first of 1982, but could be postponed for up to three years if federal officials decide this is necessary to give industry more time to plug drafty holes in the nation's homes to save energy.

The provision would exclude homeowners who cannot afford the extra expenditure and old homes near the end of their useful existence. Also exempt would be houses needing types of insulation where the energy savings would not economically justify the cost. For instance, if a house had no attic the owner probably wuld not be required to put on a new roof for insulation.

Decrepit homes bought to be renovated would also be exempt as would houses being sold for a different use, such as demolition to make way for a new building.

The program would be enforced by forbidding any federally insured lending institution from making a housing loan for purchase of a house that did not meet federal insulation standards. This would include virtually all sources of home mortgage money.

The House Banking Committee also has jurisdiction over this part of President Carter's omnibus energy bill. It has had unhappy experience trying to police national programs in this way and so may reommend against it. The issue would then have to be settled to that House floor.

Carter proposed only a voluntary insulation program with a mandatory program held in the background if that didn't work.

As the subcommittee prepared to vote on this tougher provision, members asked executive branch officials in the room for the administration's position. It received conflicting reports that were never straightened out.

An assistant secretary of the Department of Housing and Urban Development, Harry Schwarz, said the administration preferred to give the voluntary program a chance to work first.

But Robert Hemphill, in charge of conservation at the Federal Energy Administration, said he understood the administration's position was not to oppose any change that would make the conservation program more effective. Hemphill later made a telephone call and told reporters the administration neither favored nor opposed the mandatory program.

Subcommittee Democrats who met with Carter last week before beginning the vote on non-tax parts of his package said the President encouraged them to strengthen the conservation provisions of his bill.

Republicans offered a substitute to leave the insulation question to the states but were defeated 11 to 10.

The question of which houses and owners would be subject to the insulation provisions will be determined by standards drawn up by the head of FEA (or the secretary of energy when the proposed new department is created).

An amendment by Rep. Philip R. Sharp (D-Ind.) would require public participation in drawing up these regulations. Another offered by Rep. David A. Stockman (R-Mich.) provides that the regulations would be subject to a veto by a vote of either house of Congress.

Rep. Clarence J. Brown of Ohio, senior subcommittee Republican, said this was another vote in favor of "authoritarianism, of big government, of empowering a federal official to tell at little guy what he must do before he sells his house."

Sharp replied that it is necessary to bring about major changes in the nation's use of energy fairly rapidly and that "if you don't stick your neck and and take the first nothing else, the provision should case a lot of people to think about the problem, he said. And if it works hardships it can be changed, he said.

Today the subcommittee will vote on proposals for mandatory fuel efficiency standards for major home appliances.