So, I have an idea and I wish to patent but as of today I can't put it to any actual use. Is it possible to patent in that way for the sole purpose of preventing someone else from patenting it?
Absolutely, although less absolutely after some court cases in the last few years. In fact a patent does not give you the right to do anything.. It only provides the right to exclude others. You might invent an improved lawn mower but it might be seen as a variation of a already patented basic lawn mower. Or you might invent a super sonic jet but realistically only be able to get it to reality by a license deal with Boeing or Airbus. And you might first have to try to stop them if they don't cut a deal with you.
What GW said essentially covers it. Getting a patent identifies you as the inventor and prevents others from profiting from your invention (during the validity of its fees-paid lifetime, about 20 years). In most cases, there is some intent of the inventor for using the invention, at least to cover the cost of the patent process and maintenance fees.
Is it possible to patent in that way for the sole purpose of preventing someone else from patenting it?
To simply block OTHERS from patenting the same invention, a cheaper alternative may be to release a defensive publication. Making the invention public this way will prevent others from getting a patent on the exact same thing - but will also allow anyone to simply profit from it since you do not have a patent on it either.
Hang on, You can't patent "ideas" , only their reduction to practice.
So you need to be able to disclose the exact detail of the device or method that is required to achieve the end result. So you need to guess at a way of getting your idea to work and patent that. If you guess wrong and slip up so it won't work as described then your patent is worthless. Having said that, there are a lot of "patent trolls" out there, filing "submarine patents" that lurk just below the surface, ready to sink any newcomer or at least ransom some critical IP.
I've worked for a company with fairly strong patent protection ina particular area, they saw a potential workaround for competitors, and we patented that approach too. Sometimes, on the road to discovering the best method, you discover second best and third best methods. So patenting these also-ran methods blocks others, although you have no need of them. A bit like playing chess, the also-rans are the pawns in your patent portfolio.