When using the potential form of a verb, I was taught that the particle を becomes が. However, in real life this seems to not always be the case. I've even heard Japanese people use を instead of が quite often.
What's the difference between the following two sentences? Is を actually grammatically correct?
ここで切符が買えますか?
ここで切符を買えますか?