This is entirely possible in principle. It would be a way to gain additional income on treasury shares, much as any holder of shares in a brokerage account can gain income by lending them if the broker allows.
Normally, treasury shares are something of an accounting cipher because they don't affect the number of outstanding shares or the value of the company. They typically become real only when the company sells them on the stock market (secondary offering). This could be done whether they were previously counted as treasury shares or whether they previously didn't exist at all.
Given that treasury shares are on the books, there doesn't seem to be any fundamental obstacle to lending them rather than selling them, although stock trading infrastructure might not readily support it (since they are not part of the public float). Rather than responding to the price of the stock, the company would be responding to the current borrow fee. If the stock is hard to borrow, this would be an opportunity to earn a yield by conjuring shares into existence.
It would temporarily increase the effective supply of stock and facilitate short selling, which the company might not like, but the yield might make it worthwhile, and there is no dilution. Dividends paid on the lent shares would be paid right back to the company as payments-in-lieu by the borrower.
As for ideas like the owners of lent shares voting to not have to return them to the company, such a measure would violate laws or by-laws on equitable treatment of shareholders (versus owners of ordinary non-lent shares). There cannot be only lent shares, because a company with zero outstanding shares doesn't exist.