Of course, you can! So long it’s on the way to your intended destination with minimum detours. Oh yes, one more thing, you must check with all parties in advance if they are agreeable with the proposed sharing arrangement.
Country’s Regulation Alert! Current carpooling for non-commercial drivers, you can only complete 2 trips in a calendar day.