North Carolina State finally lost yesterday, dunked at the buzzer by the NCAA.

Only a few hours before the national collegiate basketball champions were to fly to the White House at the invitation of President Reagan, N.C. State officials had to call and postpone the visit because the NCAA refused to give its approval, citing a funding problem.

NCAA rules prohibit schools and any of their organizations from paying for teams to travel more than 100 miles for noncompetitive reasons after the season.

WRAL-TV, the ABC affiliate in Raleigh, N.C., offered to pay the $1,770 in air fare for the team.

"All I wanted was for the kids to get the once-in-a-lifetime chance to visit the White House and the president of the United States," said Neil Kuvin, general manager at WRAL. "I figured, how much can it cost? We told the school to book 18 seats ($118 round trip) to Washington on the 2:45 p.m. New York Air flight and send the bill to us.

"But the NCAA got wind of it and said there was nothing in the rules that covered private donors," Kuvin continued. "The NCAA said it had to check and see if it was all right. Well, while they were taking so long to decide, we were told by the White House that without confirmation (by 10:30 a.m.) we would have to cancel for the day because the president would have to alter his schedule.

"The people at the White House have been very nice about it. They left the impression that we could try it another day if we get approval from the NCAA. I understand the intent of the NCAA rules, but it seems so silly not to let these kids go to the White House. Maybe they can still go. But right now, we're standing around with our hands in our pockets."

A White House spokesman said the president is willing to reschedule the greeting if N.C. State and the NCAA find it possible.

Rudy Pate, a vice chancellor at N.C. State, said he talked with John Toner, president of the NCAA, who said he would have to get approval from the 16-member NCAA Council through a conference call. Getting those members together apparently caused the delay. Toner could not be reached for comment yesterday.

Pate said President Reagan called Bruce Poulton, the university's chancellor, on Thursday to extend the invitation after North Carolina State won the national championship late Monday night by defeating Houston in Albuquerque.

Pate said Coach Jim Valvano and the team were very disappointed. Three of the players, Thurl Bailey, Dereck Whittenburg and Sidney Lowe, are from the Washington area and were looking forward to being honored at home. Last weekend, Bailey said he hoped there would be a parade or official welcoming for them.

In a separate development, Valvano said yesterday he plans to have surgery within two or three weeks for a hernia. Valvano returned to the office for the first time in a week. "I have not celebrated because of an eight-day bout with the flu," he told United Press International. "The flu won."