During his recent visit to Europe, Secretary of Defense Caspar Weinberger said that detente "only reinforced the Soviet prison wall which stretches from the Balkans to the Baltic." That is wrong. Detente made possible the Polish revolution. It did not cause that revolution, which had quite different roots. But only during a period of relaxation of tensions, such as we have had since the Moscow summit of 1972, could the Polish events take place.

Weinberger is quite correct when he points to the dangers of detente. But these lie elsewhere. They lie in the strengthening of the Soviet war machine, which has been facilitated in part by the enormous credits poured into the Soviet bloc by West Europe and in the web of East-West economic relationships in which the Western Europeans have become entangled.

The United States is also entangled. And at the heart of our entanglement lies the agreement of 1975 in which the Soviet Union agreed to purchase for cash 6 million to 8 million metric tons of wheat and corn annualy. These purchases are of great strategic importance to Moscow because Soviet agriculture is simultaneously the most highly capitalized and the least productive in the developed world.

Following the Soviet invasion of Afghanistan, the Carter administration introduced an embargo on grain sales -- actually, a mini-embargo, since it permitted the Soviets to lift from American ports the roughly 8 million tons of grain for which contracts had been signed before the invasion.

Now President Reagan has removed this mini-embargo, convinced that the Soviets do not intend to invade Poland. It might be possible to make such a judgment a year from now, after we have seen how the Soviet leaders react to such important changes as the proposed restructuring of the Polish Communist Party in July. It is not possible now.

The grain agreement expires at the end of September. There will be great pressure from American farmers to renegotiate the agreement and to accede to Soviet demands. Officials of the Soviet Foreign Ministry last week told Rep. James Sensenbrenner of Wisconsin that a new agreement must be accompanied by American financial guarantees against a political embargo.

If a new agreement is concluded on Soviert terms, can anyone doubt that American industrialists and manufacturers would demand that they not be left to bear alone the burden of forgoing profitable trade with the Soviet Union? Many would like to get back into the business of selling them factories, such as those at the Kama River truck complex, which turns out the trucks that carried Soviet troops into Afghanistan in 1979 and that have been carrying Soviet troops to the borders of Poland.

How will the administration justify telling American businessmen that they cannot sell "strategic" equipment to the Soviet Union when American farmers are selling the most strategic good of all?

How will its policy differ from that of the Nixon-Ford years when, with our NATO allies, we were developing trade and providing the credits that have enabled the Soviet government to afford both guns and butter?

There would be one signal difference between detente than and now. Then, the pursuit of dentente was justified by the argument that "vested interests in peace" would be developed in the Kremlin by the creastion of a web of interrelationships with the West.

Regrettably, however, the vested interests were created not in Moscow, but in the West. International bankers, farmers, manufacturers and businessmen in every Western country, including the United States, have become pressure groups for the maintenance of detente, regardlesss of Soviet behavior.

President Reagan is asking the American taxpayer to finance an increase in the defense budget, which, over the five years through FY86, is projected to be $181 billion, or three times a large as the increase of the Vietnam War (taking inflation into account). The reason given is that we need to catch up with and overtake the Soviets in the arms race. But the continuation of the policy of dentente in trade would mean that we and our NATO allies would simultaneously be helping the Soviets, through our exports of grain and advanced technology, to maintain the current high rate of their military buildup.

This makes no sense if we are concerned about the future of Afghanistan and Poland. The Afghans are fighting with flintlocks and homemade Enfield rifles against Soviet tanks and helicopter gunships to win back their right of national self-determination. Against Soviet psychological and military threats, the Poles are struggling peacefully to create new forms of national, political and social life that will enable them eventaually to live a normal ife and to win a modicum of those benefits of freedom that we in the West take for granted.

It comes down to whose side we are on -- those who are struggling in different ways to achieve self-determination or those who want to deprive them of it.