Just curious, why would you want to give a 5 month old puppy milk formula? Is there a nutrition issue, is it not gaining weight the way it should, are you thinking it would be a treat, or is there another reason? I ask because that is like saying, can I give my 2 year old child pureed baby food? Sure, you "CAN" but why would you need to do that? Some children may have medical reasons, some children need to gain weight and they are not able to chew solid food well, etc. Now, this being said, I have been known to give my lactating dams some homemade puppy formula with her food, but not as a regular addition to her food, just as a little "pick me up". I do raise dairy goats, and all of my dogs get a little goat milk once in a while and goats milk is NOTHING like cows milk. It is easier to digest because of the make up of it. I have raised orphaned animals of all sorts, on goats milk instead of a "formula" and I don't buy any sort of formulas, I make them myself.
So, to answer your question, Yes, you "can" give a 5 month old puppy milk formula, no one is going to arrest you for it. But think about it first, is it necessary, or are you just giving it once in a while as a treat, or are you wanting your baby to stay a baby