A livery yard owner has no legal right to sell a horse to cover an unpaid livery bill unless there is a verbal or written agreement allowing them to do so.
Many livery yards will have a livery agreement that states that in the event of the livery bill going unpaid the livery yard owner will have the legal right to hold a lien over the horse or claim ownership of the horse.
(In law, a lien is a form of security interest granted over an item of property to secure the payment of a debt or performance of some other obligation.) Wikipedia
Without a verbal or written agreement the livery yard owner does not have the legal right to hold a lien over the horse or to sell the horse.
Even if there is a verbal or written agreement, by law, a livery yard owner has to give the horse owner 28 days notice of their intention to sell the horse. This has to be given in writing and served upon the horse owner.
Also a livery yard owner (or anyone else) would not legally be able to sell any horse without the horse's passport, therefore if they are not in possesion of the passport they cannot sell the horse.
Disclaimer: The information in this article is for general guidance on your rights and responsibilities and is not legal advice. If you need more details on your rights or legal advice about what action to take, please contact an adviser or solicitor.