Reuven goes to his good friend Shimon and tells him that he needs $10,000 for X. Shimon naturally agrees. Reuven then realizes that he needs the money for Y instead.
Is Reuven allowed to use the money for Y, or must he get permission for it first?
Given that the money was not given on condition and it is a regular loan: From Shut Torat Emet Siman 135: .... The malveh (lender?) has no rights on the money because they were meant to be spent. He has no business with the loveh (receiver?) until the date he has to receive the money back.
If the loan is in condition then it depends on what the conditions were.
The Gemara (Bava Metzia 104b) says of an iska (a business venture where one partner puts up the capital, the other is the manager, and they split the profits) that it is "half loan and half deposit." That being the case, the Gemara continues, "if he [the managing partner] wants to drink beer with [his half, rather than using it for the business], then that is perfectly in order" - all he's doing is forfeiting his half of the profits.
Rava there disagrees, and says that the whole point of the iska arrangement is that the financier gives the "half as a loan" with the understanding that it will be used to run the business. That is indeed the halachah.
So it sounds like according to this, Reuven may indeed not use the money for anything other than what was contracted at the time of the loan.