It is possible but it is not easy.
To begin with, you certainly need to gather as much information as possible about the type of music you want to learn and the type of guitar you would like to buy.
Another important thing is consistency in how you practice. Practicing just 15/20 minutes a day is far more effective than practicing even a few hours but only once in a while.
One last important tip is to try to record a video of your performance so that you can check, possibly from different angles, how your technique progresses.