بسم الله الرحمن الرحيم
In the above case, if you make your non-Muslim friend your wakil to take the loan from the bank on your behalf then in this case both the ways are equal whether your non-Muslim friend takes loan from the bank or you directly take it from the bank. You shall be sinful for paying interest. And if you do not make him wakil rather he takes the loan from the bank for himself and gives you as debt then in this case if you pay more than the actual amount taken as debt it shall be interest and it will be sin whether you pay the interest to the bank or to your non-Muslim friend. Hence if you are in need of money, you should look for interest free debt so that you will not have to go for interest based dealing.
Allah knows Best!
Darul Uloom Deoband
This answer was collected from the official ifta website of Darul Uloom Deoband in India.