Doctors discovered the presence of the tumor during a physical earlier this month.
Dr. Eric Wallen said the 62-year-old Williams should be able to coach when the Tar Heels begin practice for the 2012-13 season on Oct. 13.
Williams may have a second surgery to remove a tumor from his left kidney at a later date and could be sidelined for a few practices.
"The surgery went well and according to plan," said Dr. Wallen. "Coach Williams did great. I fully expect him to coach this season and for years to come. He could miss some practice time if we perform another procedure sometime in October, but he would be able to resume his coaching duties prior to the start of the regular season."
"Our thoughts and prayers are with Coach Williams and his family for a full recovery," said UNC Director of Athletics Bubba Cunningham. "Obviously his health and prognosis are my greatest concerns. He's in great hands with the medical staff at UNC Hospitals."
Williams is entering his 10th season as the head coach of the Tar Heels and 25th as a college head coach.
The Asheville native has directed teams at Kansas and UNC to a record of 675-169. His winning percentage of .800 is the fourth highest in the history of college basketball and No. 1 among active coaches.
"Patti and I send all best wishes to Coach Williams and his family," said Chancellor Holden Thorp. "All of us at Carolina are thinking about him, hoping he recovers quickly and looking forward to having him back with us soon."
Sources told ABC11 the results of a biopsy on the tumor weren't yet known. It could take up to a week to find out.
There was also some good news for Williams. Doctors didn't have to take the whole kidney, which means he can still use what is left.