Because @Buffy answered, and what they said was 100% true, but in my view could be misconstrued given the background you offered, I am posting a separate answer:
No, you cannot do what you want to do. What you want to do is effectively submit your friend's work as your own. You want this because you don't have time to write it yourself, you say.
Which means: you didn't do the assignment, and now you can't. You want to work around this inconvenient truth by submitting another's work as your own.
You don't have a paper to submit. Full stop. That's the reality, and you have to contend with the consequences of that reality.
Here's a test. If you properly quoted, cited, and attributed the work to your friend, which you are obliged to do¹, what mark would your professor give you on this paper? Would it be the same as the mark you'd get if you didn't mention the words were written by him²?
Doing the arithmetic, the difference in the marks is the precise value of your plagiarism.
¹ Plagiarism isn't about consent, it's about attribution. You can very often quote someone without their explicit consent, but never without their permission.
For example, Lady Marguerite Blessington said "Borrowed thoughts, like borrowed money, only show the poverty of the borrower". Lady Blessington didn't give me her permission to quote her here. I didn't even ask. But it's not plagiarism because I attributed the words she wrote to her, and didn't try to pass them off as my own.
Now copyright is another issue. It may be that one day Lady Blessington's estate may sue me for copyright violations, because I didn't get their consent to use her words in this post. But I'll never be sent up the river for plagiarism for it.
² Addressing a smaller matter in your question: would it surprise you to learn that it's not only possible, but extremely commonplace, to cite material that is not online? It may even be that when your prof got his PhD, not one of his citations was online. But he managed it still.
"It's not online" is not an excuse to avoid citation; it's almost absurd. Though I suppose it makes it easier to get past online plagiarism checkers, if that's something you're considering.