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.
Mike Brey is looking at former Notre Dame players to fill two assistant jobs that have opened up with the departures of Martin Ingelsby and Anthony Solomon.
Purdue's 2016-17 prospects got a jolt Wednesday when forward Caleb Swanigan announced he will return for his sophomore season.
Clemson's Jaron Blossomgame says he is withdrawing from the NBA draft and returning to school for a final season.