GOP presidential candidate Ronald Reagan's warning last Wednesday against "reckless actions" in the world arena, according to one of his senior military advisers, reflected a nagging feeling in the Reagen camp that President Carter might spring an "October surprise."

Neither Reagan nor his advisers are making the accusation that Carter planned or ordered an invasion of Iran in mid-October, as charged by columnist Jack Anderson, but at the same time they are taking precautions against the possibility.

The concept of an "October surprise" somewhere in the world "has been nagging at some of us for some period of time," said William R. Van Cleve, co-director of Reagan's panel of military policy advisers. "One would have to be pretty insensitive if recognize the possibility."

The relevant paragraph in Reagan's speech to the American Legion convention last Wednesday was written at least a week before the Jack Anderson columns, according to Van Cleve.

"There had been rumors floating around for some time about various unexplained military exercises. But one doesn't know whether this was just prudent contingency exercises or what's involved," Van Cleve said.

Others in the Reagan camp said there had been considerable discussion in the campaign councils of a possible "second week of October scenario" well before Anderson's columns on the subject were received in newspaper offices. There had also been discussion, according to a source close to the campaign, about ways in which Reagan could deal with political fallout of such a sudden international move.

Part of a recommended "preemptive" strategy for Reagan was to warn in advance that the United States is not prepared at this time for a military showdown abroad. In the view of some of his advisers, this would prepare the way for him to make the same point more forcefully if there should be a military crisis of a seemingly contrived nature before election day.

A major statement along these lines was one option discussed within the Reagan camp, but in the end Reagan's message was condensed to this language deep in his address to the American Legion:

"The military policies of the Carter administration are in disarray.The weakness of those policies can ultimately become provocative. We must hope that this administration will not be tempted to take reckless actions designed to reassure Americans that our power is undiminished. The facts are that we lack the capability to project our power to many areas of the world. It will take a responsible, balanced long-term program to restore our respectability."

According to Van Cleve, who had a hand in drafting the American Legion speech, this paragraph "doesn't apply specifically to [an invasion of] Iran, but it aplies generally to the possibility" of surprise military action.

The adviser went on to say that in the absence of the U.S. "margin of safety" over the Soviet Union -- a margin that the Reagan camp contends is nonexistent -- "it is certainly not the time to make commitments you can't keep, or to entertain the notion of getting into actions for which you simply don't have the capabilities."

Van Cleve, who served on Nixon administration's negotiating team for the first strategic arms limitation treaty and is director of the University of Southern California's strategic studies program, was asked how Reagan's concern about projecting power would apply to Carter's "Persian Gulf" doctrine that the United States will repel by force any outside threat to that oil-rich region.

"If the concept simply means that we have vital interests in that area of the world and that those vital American interests should be under American protection to the extent that we are capable, we'd ad agree," Van Cleve replied.

On the other hand, if a literal American commitment to repel invaders is intended, he added, "until we get bases there and some stronger capabilities, we simply don't have the strength to fulfill that commitment."

Asked how long it would take to build forces that he would consider adequate to back up such a commitment, Van Cleve said he "would hope" it would not take as long as several years, but he gave no specific estimate.

Van Cleve, who works from a small suite of offices on 16th Street NW rented by Richard V. Allen, Reagan's senior foreign and defense policy adviser, is codirector with retired Air Force Lt. Gen. Edward Rowny of Reagan's military policy advisory group. Van Cleve said the group has established 13 subcommittees to study matters ranging from strategic nuclear forces to budgetary questions.

Asked how much the military program Reagan envisions would cost, Van Cleve said he does not expect the advisory group to produce even "ballpark" estimates until after election day.

"We need a very significant increase" in military spending, Van Cleve said. He pointed out that Reagan, in his speech to the American Legion, had said a U.S. military buildup would "not be easy, nor will it be inexpensive," but that this nation could afford it.

Van Cleve's personal estimate, which he stressed has not been endorsed by Reagan, is that 6 percent of the total U.S. gross national product, "or maybe even a little more," may be required for military purposes.

Six percent of the estimated GNP for fiscal 1981 would be $169 billion, or about $12 billion more than the presently antipated record-breaking budget outlays of $157 billion for defense.