But even in other cases it's wrong: the shares may be from Mr. A's margin account with the same broker, in which case the margin account contract included the right for the broker to lend the shares; so Mr. A has already been asked about loaning shares and accepted.
Similar analysis can be extended to the case where Mr. A is either another broker lending inventory shares to the broker lending to Mr. B or where Mr. A has a margin account with such a broker.
No one is lending shares unless they own them or have a contract with the owner where the owner has agreed to allow such lending.