Here's the portion from the MD statute 4-203. I don't think simply walking your dog would apply but IANAL
Maybe you could say you're teaching him how to obey while you walk? You still could not carry a loaded firearm while engaged in this activity if this is the law Jack was referring to.
Warning, I am not a lawyer. I do think Jack is correct based on how 4-203 is written.
The exceptions in 4-203 don't make any sense unless you understand them to mean that carrying while dog obedience training in class or show is legal. If someone reads that and concludes you can't wear or carry a firearm unless it's enclosed and unloaded during dog training; they would also have to conclude that informal target shooting and everything else is illegal unless you keep the gun enclosed and unloaded while participating in the activity.
In other words, I think the enclosed and unloaded only applies to the transporting to/from all the activities exempted from the wear, carry, and transport ban.
Correct?