No, Joaquin did not play guitar in the movie, but he did learn to sing, as did Reese. No lip synching.
There were several real-life guitarists who had roles in the movie. Dan John Miller played Luther Perkins, Cash’s long-time guitar player. Waylon Jennings was played by his son, Shooter Jennings, and Jerry Lee Lewis was played by Waylon Payne, Waylon Jennings’ godson.
There was an historically more-or-less accurate scene in the movie where Waylon Jennings is teaching his chicken pickin’ method to Luther, who adapted for all of Cash’s 60s hits. Nice touch for guitar aficionados and amateur musicologists.