Adm. H. G. Rickover took the occasion of a recent White House ceremony honoring him to shoot at his favorite targets one more time, reportedly stunning President Reagan in the process.

Rickover, administration sources said yesterday, had been invited to the White House Jan. 8 to receive the thanks of Reagan, Defense Secretary Caspar W. Weinberger and Navy Secretary John F. Lehman Jr. for his contributions over 60 years as a naval officer, especially in helping make the nuclear Navy a reality.

But Rickover, who at 82 is being retired against his will this month, decided against following the usual practice of humbly taking the plaudits of the government's highest officials. He used the occasion instead, sources said, to fire anew at his old demons, including shipbuilders and civilian policy makers--most particularly Lehman.

The Navy secretary was the one who had recommended that Rickover be replaced this time rather than be extended on active duty for another two years.

Rickover himself declined through a Navy spokesman to make any comment about his performance.

Rickover's replacement is expected to be Vice Adm. Kinnaird R. McKee, 52. McKee is out of the Rickover nuclear submarine Navy but is portrayed as far more in tune with today's officers than was his mentor. McKee served as superintendent of the Naval Academy from 1975 to 1978 and is stationed at the Pentagon as director of naval warfare.

Navy sources said there were fierce arguments behind-the-scenes about how Rickover's two jobs should be structured in the future, with one idea to put the next director of nuclear propulsion directly under the chief of naval operations instead of running an office within the Naval Sea Systems Command located outside the Pentagon in an office complex in Crystal City, Va.

However, it appears Rickover's successor will hold both of his old jobs, director of Navy nuclear propulsion and head of civilian reactor programs within the civilian Energy Department.

Rickover was able to build his power base in Congress partly because he wore those two hats at once. He was both "Adm. Rickover" and "Mr. Rickover," and could use one position to strengthen his hand in the other. Critics complained that under that setup he could even order himself to do something he himself wanted done.

Adm. Thomas B. Hayward, chief of naval operations, was asked recently whether he considered Rickover's independent behavior as an acceptable role model for Navy officers. "Rickover would tell you the same thing he told me," Hayward replied, "that there's room for only one Rickover."

Apparently the White House ceremony made a believer out of the president.