As near as I can tell, locking horses only prevents them from being sold when you click on the 'sell everything' double arrow at the top. It does not prevent them from being used to upgrade units. I set the lock on my horses and mules, on my food, on my smithing raw materials and on my crafted weapons so they don't get sold when I am dumping a bunch of loot with 'sell-all'.
If you set the lock on weapons and then try to smelt the weapon, you will get a warning. But you get no warning when you try to sell a locked item.