Years ago, I strapped my recumbent trike on top of my car and went an hour or so south for a ride. As I left one small town, a black, medium-sized Lab mix bounded out from a farm yard. I could tell from her body language that she wasn’t hostile, and she bounded along behind me for a couple of miles until I got close to the next town.
She was waiting for me on the return trip, and followed me into the first town, where I rolled into a bar parking lot and asked someone if they could get her a bowl of water to distract her, otherwise I might be taking a dog home - and I was still ten miles from my car.