Rear Adm. John M. Poindexter, the former national security adviser who resigned in the midst of the Iran-contra affair, has said he wants to retire from the Navy this fall, Pentagon sources said yesterday.

Poindexter, 51, has requested that the Navy allow him to retire as a vice admiral, the three-star rank he held while serving as national security adviser to President Reagan from 1985 until his resignation last Nov. 25. When Poindexter returned to the Navy after resigning from the White House position, he reverted to his previous rank as a two-star admiral.

Pentagon officials said they expect his request to retire at the higher rank to be highly controversial because of his Iran-contra role. Poindexter, along with others, is reported to be a target of an ongoing probe by independent counsel Lawrence E. Walsh.

During congressional hearings on the affair, Poindexter testified that he had kept Reagan from learning about the diversion of profits from Iranian arms sales to the U.S.-backed Nicaraguan rebels to protect the president.

"It's going to put some people in a difficult position," said one Defense Department official.

Officials said the retirement at the higher rank ultimately would have to be approved by Reagan and the Senate. Defense officials said the difference in retirement pay between a two-star and a three-star admiral is about $29 per month. A two-star rear admiral with 29 years of service can retire with a pension of $52,764 a year.

Military officers usually cannot retire at their highest rank unless they have served in that position for at least three years. In some cases, however, the rule has been waived with the approval of the president and the Senate.

Since his resignation from the White House, Poindexter has been serving as a special assistant to the chief of naval operations, Adm. Carlisle A.H. Trost. A spokesman for Trost said he has received no letter of request for retirement from Poindexter. The spokesman declined to comment on reports that Poindexter has made a verbal request to retire Oct. 1.

Poindexter is a 1958 graduate of the U.S. Naval Academy and has a doctorate in nuclear physics.