Two principal officers of Rockwell International Corp., the firm that was to build the B-1 bomber, sold one-sixth of their stock holdings worth $1.4 million 10 days before President Carter killed the program, federal records showed yesterday.

Another top official sold 5,000 shares for $166,000 - one-sixth of his holdings - a few weeks earlier.

In April, the Rockwell employee's trust fund made net purchases of more than 142,000 shares as Carter reviewed the program and Congress moved toward approval of financing.

Rockwell chairman Willard F. Rockwell Jr., general counsel John J. Roscia and President Robert Anderson could not be reached in telephone calls to Rockwell corporate headquarters in Pittsburgh.

Two company spokesmen said the officers were en route to a stockholders meeting Friday in California and could not be reached for comment.

Rockwell sold 36,200 shares and Roscia sold 2,000 shares June 20 for almost $1.4 million, according to statements filed with the Securities and Exchange Commission. Anderson reported the sale of 5,000 shares on May 26.

After the transactions, Rockwell reported holding 166,263 shares, Roscia 10,150 and Anderson 21,500.

Rockwell shares rose to a 1977 peak of $37.25 a share on June 29. When Carter killed the program in a surprise decision June 30, Rockwell shares lost more than $4 in value in active trading on the New York Stock Exchange.

Although Carter's cancellations of the program was so unexpected that it caught his closest advisers and most of Congress, including House Speaker Rep. Thomas (Tip) O'Neill (D-Mass.) off guard, the timing of the sales raises questions about the basis for the Rockwell executives's decisions.

If they decided to divest for personal or intuitive reasons, there would be no legal problem with the sales. But should an information leak from anyone with input with the B-1 decision have been the grounds for the sales, the three would be involved in the SEC's insider trading rules.

Any person who trades securities based on information not available to the general public or trades on information that will be released publicly before the release time could be liable for both civil and criminal penalties under the insider trader provisions of the securities laws.

The trading limitations and the severity of the accompanying penalties vary depending on the whether the party involved is a shareholder, employer, officer or director of the company. The strictest penalties apply to officers and directors who are charged with a duty to protect other shareholders' investments.

Rockwell was prime contractor for the $24 billion program to build planes for the Air Force that could penetrate Soviet Air Defenses.

After Carter said he could no longer support the program, Rockwell said it would layoff about 10,000 employees.

The records also showed that Willard Rockwell sold 6,366 shares from a family trust April 11. Although securities regulations required the reporting of such a transaction by May 10, the report was not filed until June.

In the same month, United California Bank, trustee for the employee's Rockwell International Corp. Savings Plan made net purchases of more than 142,000 shares.