Julius Rudel, director of the New York City Opera Company for 21 years, announced yesterday that he is resigning that post as of June 20, 1979. He will be succeeded by the international opera star, Beverly Sills.

Rudel, who will remain with the company as principal conductor, will become music director of the Buffalo Philharmonic in the fall of 1979. "I am more than comfortable with my new situation-I am happpy," he commented, adding, "I will be busier than ever in the future."

There have been reports of disagreements between Rudel and the City Opera board, but Sills said yesterday that the change in leadership "has been in the plans for five years. Not long ago Julius and Rita (his wife) and I opened a little diary we have kept, and there it was, five years ago. After a rehearsal of 'Puritani,' Julius proposed that I should come in as co-director.

"I said, 'But here I am in the midst of all this activity, the Met debut coming up, and all the rest.' And Julius said, 'Yes, but this is the time to think about when you want to taper off and to stop. I said I was planning that for my 50th birthday. He then proposed that I come in with him as co-director in 1979-that has always been our date.

"But about a month ago, he called me to his apartment and told me how well things were going for him-his Metropolitan debut and the Buffalo orchestra. He said he needed room to move and that he thought if he did not make this move now, in five years he would look back and wonder why he had not. So he asked me if I could com ein sooner, as director. I said, 'When?' and he said, 'mid-'79'."

Demands for Rudel's conducting have expanded in recent years. In addition to his heavy schedule with the New York City Opera, he has conducted opera in Vienna, Salzburg, and Paris, as well as City Opera's annual performances in the Kennedy Center and Los Angeles.

His orchestral appearances have increased, with annual summer concerts with the National Symphony at Wolf Trap and engagements with the Philadelphia Orchestra at Saratoga.

Rudel was appointed music adviser to the Kennedy Center in 1963, three years before the Center opened. That title was later changed to music director, a post he held unitl January 1975, when he resigned it to devote more time to the New York City Opera.

A year earlier, while here to conduct the City Opera at the Center, Rudel has denied rumors that he was planning to leave the company.

Sills said yesterday, however, that it was about that time that she had a letter from Mrs. Rudel, "Rita wrote me from Aix-en-Provence asking me to come in sooner, saying that it was Julius' drea, his desire to have the time to do these over things.

"So now this means that I will have to cancel some things. Of course I had not booked 1980 every half hour. I've been tapering off for some time already. But at this moment I am not yet sure about some things.

"I have to be sure that I am here during the season, and also in the pre-season planning. But 'Juana La Loca' was a present to me from Larry Deutsch, and is part of our season here." "Juana La Loca" is a new full-length opera by Gian Carlo Menotti, commissioned by the late Larry Deutsch, a West Coast opera patron. Its world premiere is scheduled for next June in San Diego, with Sills in the title role of the mad wife of Philip the Fair and the mother of Charles V. As things now look, that opera might be Sills' farewell performance as a singer.

She talked only briefly about her plans for the New York company, though she has been making them for some time. "Julius will of course be our principal conductor. He will do 22 performances for us in New York and dates in the Kennedy Center and in Los Angeles.

"The 1979 seasons is alreeady intact, of course, and some of '80. I have some ideas for '80. I have some ideas for '80, but my plans are being made for the season of '81." CAPTION: Picture 1, Beverly Sills; Picture 2, Julius Rudel, by Linda Wheeler - The Washington P