It's obviously not a good idea if the dog isn't trained to follow commands.
My border collie takes her "rides", seriously - like it's her job to stay stuck to my right side , about 6 inches from my pedal.
She knows SLOW, STOP, LEFT, RIGHT, and doesn't pay attention to any distractions.