We are big fans of a proper structured walk, that means no sniffing, marking, pulling, lunging, barking, lagging behind etc...
If your dog all of a sudden stops and starts to go to the bathroom, you can absolutely move the dog to the side and have them finish potty time.
You will find your dog will start to go to the bathroom on command soon enough, it is very practical for folks that travel a lot with their dogs or need to take them out for a quick potty and need it to be quick.