Yes, provided you can have a safe handover (eg in a front garden)
If you can bring your own lead, poo bags and treats, even better. Otherwise good hand hygiene (use sanitiser whilst out and about, and immediately after handing back, wash thoroughly as soon as you can)