May I fly from the right seat due to a temporary disability?
Generally speaking if your carpal tunnel syndrome is so bad as to preclude normal operation of an aircraft you probably shouldn't be flying from either seat: If something goes wrong you may well need both hands to operate the aircraft (we do have one-armed, and even no-armed pilots, but they generally have medical exceptions, and possibly additional restrictions).

If you cannot complete your training before your surgery your best bet would probably be to defer your checkride until after the surgery - yes this will probably mean additional training time after your surgery to knock off the rust, but you will likely need this anyway (you're going to get rusty during your recovery whether you're a certificated pilot or a student).
Additionally it's probably a good idea to have a safety pilot with you for your first few flights after recovery to ensure you're physically able to perform all the tasks required to safely fly an airplane, and an instructor accustomed to flying from the right seat makes an excellent safety pilot so you could knock off the rust and do your checkride prep at the same time you're making sure you can safely operate an airplane.



Re: FAA paperwork, I'm not an AME but looking at the FAA's Guide for AMEs carpal tunnel syndrome doesn't appear to be disqualifying unless it presents a "medical deficiency" (broadly "interferes with you operating the flight safely").  

When you have your surgery you'll be effectively grounded until you recover adequate normal function in your hand to operate the flight controls without risk to the safety of the flight, and more importantly without risk of doing further damage and hindering your recovery.  

Having had surgery is something you'll need to report on your next medical application (Question 18, item x: "Other illness, disability, or surgery "). Speak to your AME for details on what you may need to bring to the exam, if anything: Some may want a note from your treating physician stating you've regained normal grip and sensation, others might be OK just checking out your hand during the exam per 67.313 and saying "Your hand seems fine to me."
If you're enrolled in AOPA's Pilot Protection Services you can contact them for information on what you should have available for the exam.