Shakespeare has a lot of immortal advice, but he really hit the nail on the head with "Neither a borrower nor a lender be; for loan oft loses both itself and friend." It was true long before the Elizabethan era, just as it is today: Money can ruin relationships, whether you need cash or you have it.
The situation will come up for you, though — that's why the quote still resonates today. Someone you love will ask you for money, or you will be in a position to do the asking. It's not a recipe for disaster by default. There are ways to set boundaries and expectations around the process so everyone emerges happy at the end.
As with most seemingly intractable problems, it all comes down to clear communication. Experts recommend deploying as much transparency as possible. One good way to do that is to actually have the lender pay for an item or a service directly, rather than funneling the money through the borrower. That shows that you're serious about the terms of the agreement and about what you need the money for.
Beyond that, honor the fact that yes, for a time, this will change your relationship. Keep in mind how you talk about spending, even on social media. And as with anything that needs to hold up under scrutiny, document everything. Write out and sign your repayment plan, and keep to a schedule as closely as possible. Talk things out if you need to adjust the terms. If you handle everything well, there's a chance you may come out better friends once you're in the clear.