Trailing 27-20, the Wildcats (2-2) went on a 16-2 run, with Bamforth scoring eight straight points in the spree, including a pair of 3-pointers.
Dayton (4-2) used a 7-0 spurt to tie it at 38, but couldn't pull ahead until a Josh Benson three-point play with 2:34 to go made it 57-56.
Tresnak knotted the game with a free throw, then Bamforth hit a 3 with 1:26 remaining.
Benson trimmed the deficit to 60-59 with two free throws, which Bamforth matched with 8 seconds left. Devin Oliver made a layup with 1 second remaining for the final margin as the Flyers saw their three-game winning streak end.
Kevin Dillard led Dayton with 18 points and Benson had 17 in the first meeting between the programs.
Former Kentucky guard Ed Davender, the only Wildcat with at least 1,500 points and 400 assists, has died. He was 49.
Guard Naz Mitrou-Long, whose 2015-16 season ended in December due to hip problems, has been granted a hardship waiver for the coming season, Iowa State said.
As the Sooners look to life without superstar Buddy Hield and his sidekicks, it's clear their unseasoned players will need to grow up fast.