if you are stopped for a traffic violation the officer will want three things right off the bat...driver's license, vehicle registration and proof of insurance. when the name and address on your driver's license (you) does not match the name and address on the registration (your friend) the officer will have questions. in most cases a verbal explanation may be all that is required when the officer asks "do you have permission to drive this vehicle" or "does the owner know you have this vehicle". but it wouldn't hurt to have a signed and notarized written statement from the owner with you explaining the circumstances and including his contact phone number.
enjoy your trip!