Soviet leader Yuri Andropov was under hospital care last week following an attack of an unspecified kidney ailment, well-informed Soviet and diplomatic sources said tonight.

They said that the condition of the 68-year-old Andropov was not causing serious concerns here, that he has been recovering normally and that it was possible that he could resume his public duties this week.

It was not possible to obtain any formal comment on the state of Andropov's health.

The sources said that the new Soviet Communist Party general secretary was suffering from a chronic kidney ailment described as nephritis. He was said to require periodic rest periods, and he reportedly is subjected to a strict diet. Nephritis, once called Bright's disease, is a chronic disease of the kidneys that is characterized by inflammation and degeneration of those organs.

The first speculation about something unusual among the Soviet leadership came last weekend when the government did not issue its customary communique on the weekly meetings of the ruling Politburo. Since he replaced Leonid Brezhnev Nov. 12, Andropov had instituted weekly communiques after Politburo meetings that are held on Thursdays.

The Soviet leader was last seen publicly March 15 when he met with senior Communist Party officials from the Warsaw Pact countries and from Cuba, Mongolia, Laos and Vietnam.

A flurry of speculation about Andropov's health followed the brief visit to Budapest yesterday of Soviet Defense Minister Dimitri Ustinov. Ustinov departed for Hungary in the morning and returned home in the evening after meeting Hungarian party leader Janos Kadar and other senior officials.

According to diplomatic sources, Ustinov's visit had gone according to schedule, however. The sources said Hungary had been the last holdout in the current Soviet consultations with its Warsaw Pact allies about their financial participation in Soviet rearmament plans.

The sources said that Marshal Viktor Kulikov, the Warsaw Pact commander, conducted successful negotiations with all other Warsaw Pact members. The Hungarians, however, are said to have objected to plans to increase military expenditures and to have argued that they are not in a financial position to meet the requirements.

Ustinov reportedly was seeking to persuade the Hungarian leadership that additional money was needed to fund what Moscow sees as the mandatory response by the Communist Bloc to President Reagan's arms challenge.

Andropov's illness may have affected the scheduling of Ustinov's visit, which was unusually short. After Andropov, Ustinov is believed to be the ranking member of the current leadership and the senior figure on the Defense Council, and as such he could not afford to be absent from Moscow for a long period if Andropov were incapacitated.

However, the fact that Ustinov went to Budapest and that Premier Nikolai Tikhonov is continuing his five-day visit to Yugoslavia suggests that Andropov's condition is not regarded as very serious.

There was no information whether the Soviet leader was actually placed in a hospital or whether medical equipment had been hauled to his country house outside Moscow, where he is now believed to be resting. The sources here referred to his hospitalization, which could be a reference to either.

When seen last by western journalists at close range almost a year ago, Andropov appeared to be frail. He has been maintaining a vigorous pace in his functions since he became Soviet leader.

During the past six months, Andropov lost a good deal of weight. He also appeared pale in his most recent photographs. His last published picture was on March 3, when he met with a Mozambican government delegation led by President Samora Machel.

It should become clear in the next few days whether the Soviet leader has recovered from his ailment. The Politburo is due to meet Thursday. Andropov also is scheduled to meet with U.N. Secretary General Javier Perez de Cuellar, who is due to arrive here Sunday.

As party leader, he also is expected to attend a March 30 Kremlin ceremony commemorating the 100th anniversary of the death of Karl Marx, the founder of communism.