Nic Grigsby and Nick Booth each ran for a touchdown for the Wildcats (5-2, 3-1 Pac-10), who remain tied for second place.
Foles had a hand in all of five of Arizona's turnovers. The Pac-10's leading passer threw three interceptions, had a fumble returned for a touchdown and botched a handoff that led to a fumble.
UCLA's defense did everything it could to keep the Bruins (3-4, 0-4) afloat. All 13 UCLA points resulted from turnovers.
UCLA free safety Rahim Moore, the national interception co-leader, picked off his sixth and seventh passes of the season, and strong safety Tony Dye returned a fumble 28 yards for a score.
Bruins coach Rick Neuheisel tried three quarterbacks - starter Kevin Prince, Kevin Craft and Richard Brehaut.