Praise be to Allah.
The matter is not as you mentioned in your question, because lending and borrowing gold and silver is something that is permissible, and there is nothing wrong with it. None of the Muslim scholars have disallowed it, whether the gold and silver is in the form of coins, jewellery, ingots or otherwise.
So it is permissible for a person to borrow gold, so long as he returns an equivalent amount at a later time.
Ibn al-Mundhir (may Allah have mercy on him) said:
The scholars from whom we acquired knowledge are unanimously agreed that it is permissible to borrow dinars (gold coins), dirhams (silver coins), wheat, barley, raisins, dates and any other kind of foodstuff, whether it is measured by volume or by weight.
End quote from al-Ishraaf ‘ala Madhaahib al-‘Ulama’ (6/142)
It says in Murshid al-Hayraan (no. 69 0):
It is permissible to borrow minted gold and silver [i.e., that which has been made into dinars and dirhams] by weight, and also by number, if the weight is accurate, and the borrower may return what he borrowed in the form of a similar number of the same kind and weight, or he may pay back the same weight but a different number. End quote.
This has been explained previously in the answer to question no. 136433.
What is not allowed according to Islamic teaching is selling gold and silver, one for the other (without the exchange taking place in the same sitting as that in which the transaction is agreed upon) [riba an-nasee’ah], or selling for a different weight if the transaction is gold for gold, or silver for silver [riba al-fadl].
With regard to loans, the ruling is completely different from the ruling on selling. The difference between the two has been explained in the answer to question no. 131000.
Based on that:
The term riba an-nasee’ah is applicable with regard to selling one currency for another, as it is applicable to selling gold and silver.
And the term riba al-fadl is applicable to transactions involving selling currency of the same type, just as it is applicable in the case of selling gold for gold, or silver for silver.
The Islamic Fiqh Council has issued a statement concerning banknotes, in which it says: Banknotes are something to which people have agreed to give value, so they have value and they come under the established Islamic rulings on gold and silver with regard to the rulings on riba, zakaah, exchange of one type for another in the same sitting, and all other rulings.
End quote from Qaraaraat wa Tawsiyaat Majma‘ al-Fiqh al-Islami (p. 14).
In a statement issued by the Fiqh Council of the Muslim World League, it says:
Paper currency is a separate type of currency that comes under the same ruling as the two currencies of gold and silver. So zakaah must be paid on it, and the rulings on both types of riba, fadl and nasee’ah, are applicable to it, just as they are applicable to the two types of currency, gold and silver – because paper currency has value – by analogy with gold and silver. Therefore paper currency comes under the same rulings as other currencies with regard to all the conditions and guidelines stipulated by sharee‘ah.
Qaraaraat al-Majma‘ al-Fiqhi al-Islami li’r-Raabitah, Makkah (p. 22)
For more information, please see the answer to question no. 129043
And Allah knows best.