Ryan picked up a loose puck to the right of the net and spun around to deliver a pass through the crease to Mara, who was all alone and easily one-timed it past Anders Lindback for the win.
Mara's goal was his first point as a Duck. Saku Koivu collected a pair of tallies, including his 700th career point, and Teemu Selanne added a goal and an assist in Anaheim's third straight win, which brought the Ducks to .500 at 7-7-1.
Jonas Hiller stopped 20-of-24 shots for the victors.
Cody Franson, Patric Hornqvist and Cal O'Reilly each had a goal and an assist for Nashville while Lindback turned aside 32-of-37 shots in the loss.