IS A SECOND-BEST solution, but one better than no solution, being raggedly applied to the problem of nuclear proliferation in South Asia? India, as the subcontinent's dominant power and a country determined to avenge its border humiliation by China in 1962 and match China's first bomb of 1964, exploded a nuclear ''device'' of its own in 1974. That made it all but inevitable that smaller, already partially dismembered Pakistan would seek to catch up. It has done so behind a veil of secrecy intended in part to spare it the heavy costs (an aid cutoff, political isolation) of American nonproliferation policy. Its success necessarily shifts the burden of American policy from forestalling a Pakistani nuclear program -- a goal now overtaken -- to keeping the Pakistani program, and the Indian program it responds to, within certain discreet limits.
Rajiv Gandhi's visit to Washington this week did not mark formal Indian approval of South Asia's new state of "nuclear ambiguity." On the contrary, India regards its program as 1) its business alone,2) peaceful and 3) designed less to intimidate Pakistan than to deter China. To President Reagan's plea for an Indian nuclear ''dialogue'' with the Pakistanis, Prime Minister Gandhi offered only ''frank discussion'' with Americans. This is unfortunate: the surest way for India to choke off Pakistan's nuclear progress would be to enter such a dialogue. But Mr. Gandhi did say India would not go ahead with an actual bomb of its own "unless constrained to do so" -- words that leave Indian policy open to future choice.
Surely Indians understand why Americans are reluctant to sacrifice support for the Afghan resistance -- support rendered chiefly through Pakistan -- to punish Pakistanis for a nuclear program for whose likes India, not to speak of Israel, goes unscathed. And surely Indians realize the advantages to themselves of having Pakistan stay in a close and constraining security relationship with the United States rather than be cast out by an aid cutoff into a loneliness in which its nuclear passion could only grow.