This is not a command, it is a blessing that will occur as a result of following the halachos of Shmittah which preceded this verse. It is not that you will be forbidden to borrow, but that you will be totally independent and not need to borrow. Indeed, you will be so free and affluent that others who need will come to you for help.
Rav Hirsch translates the pasuk as
If then Hashem, your Hashem hath blessed thee as He promised thee,
thou wilt make many nations indebted unto thee, but tho wilt not
become indebted, and thou wilt be master over many nations, but over
thee they will not be master.
Rav Hirsch in his commentary explains that this is a situation that will arise on its own once Bnai Yisrael keep the Torah and fulfill the mitvos of forgiving debts when the Shemittah year arrives.
When, by the fulfillment of Hashem's Torah you will have made yourself
recipients of His Blessing, then, just by this national condition of
prosperity which finds its realisation, not in a brilliant powerful
state with a stunted standard of life of the inhabitants, but in the
well-to-do prosperity of every individual citizen, then you will shine
forth high above the other nations. With you national riches and
surplus you will help the requirements and deficiencies of other
nations, therebye they will lie under an obligation to you and be
dependent on you, but you will remain the free and independent nation.