President Reagan urged Indian Prime Minister Rajiv Gandhi yesterday to intensify a dialogue with Pakistan on nuclear issues but apparently received no assurances.

Appearing with Reagan following their talks at the White House, Gandhi, in a clear reference to Pakistan, said "another country" seemed to be on the threshold of acquiring nuclear weapons.

He said India would not produce such weapons "unless constrained to do so."

During talks that covered broadening U.S.-Indian relations on trade, science and technology, the issue of Pakistan's secret nuclear program remained a sensitive one.

The Reagan administration is concerned about Pakistan's nuclear program, which is threatening to complicate delivery of a $4.2 billion aid program to the strategically important country.

Pakistan has denied seeking nuclear weapons capability but Washington believes Indian-Pakistani talks might reduce pressure in Pakistan to move toward this goal. India exploded a nuclear device in 1974.

Reagan said he and Gandhi had discussed efforts to reduce U.S. and Soviet nuclear weapons.

"In this context, I urged India and Pakistan intensify their dialogue to build greater mutual confidence to resolve outstanding issues and to deal with the threat of nuclear proliferation in the region," Reagan said.

Gandhi, in response, said, "We do not have nuclear weapons. We do not want nuclear weapons and we certainly do not want nuclear weapons in our neighborhood. We have watched with concern developments in our immediate vicinity. Nuclear stockpiles have multiplied. Yet another country now seems on the threshold of fulfilling a longtime goal of acquiring nuclear weapons.

"On our part let me assure you . . . that we have no intention of producing nuclear weapons unless constrained to do so," Gandhi said.

He added that "time is not on our side" and urgent action was needed.

A senior administration official indicated afterward that Reagan had been unable to advance the U.S. goal of an Indian-Pakistani nuclear dialogue.

Reagan, in his public remarks, said he had assured Gandhi that U.S. military aid to Pakistan was not directed against India but was aimed at achieving stability in the region. India and Pakistan have fought three wars since independence from Britain in 1947.

Reagan said the United States and India had made substantial progress in broadening their relationship since Gandhi was last here in 1985.

The president praised the "courage and statesmanship" India and Sri Lanka had shown in seeking to end ethnic strife in Sri Lanka where Indian troops are deployed in a peacekeeping role.

Gandhi said India was determined to ensure the full implementation of a July 29 agreement with Sri Lanka under which Indian troops entered the country and are now engaged in fighting Tamil separatists.