No, you can't teach someone loyalty. Loyalty is something that can only be emulated. You can't teach a person how to be loyal, it's something that you have to make a mental decision to do.
Loyalty is something that you develop on your own, it could be inspired by watching someone else being loyal or simply by wanting to stand by someone that you admire. Loyalty is an attribute, not a skill, you don't teach people attributes, that's something that they acquire by themselves.