You aren't wrong that they could both be translated "Before going on a trip, I'm going to buy a ticket". But, there's a slight difference in context/nuance provided.
旅行の前にきっぷをかいます。really focuses on the action of buying a ticket. You
will simply buy a ticket before you go on the trip. You aren't
implying any sort of preparation.
旅行の前にきっぷをかっておきます。adds the nuance that you are doing something ahead of
time, or for convenience. You are therefore perhaps not emphasising
the action itself, but that you are doing it in advance.
In this example sentence, it is perhaps a bit of an odd sentence without the ておく, because of the 旅行の前に, which I think limits the contexts in you would say this: usually I think you would only stress that you buy a ticket before a trip in order to show that you are/intend to be prepared, as you generally can't buy tickets to travel after you have started your trip. I think if you look at other examples it might help your understanding.
鍵をここに置きました。I put a key here. (just talking about the action, maybe no
particular reason behind the action whatsoever)
鍵をここに置いておきました。I put a key here. (on purpose, so that I/someone else
can use it later)
ビールを買いました。I bought some beer. (focusing on the
action, perhaps talking about a series of events of what I did that day, or when asked what I bought at the supermarket)
ビールを買っておきました。I bought some beer. (focusing on the preparation I did, maybe for a party
I'm having!)
So, when thinking about if you should use Vておく, think about the intent behind the action. If it is done for some sort of advance preparation, for the speaker or someone else, then consider using Vておく. If you just want to focus on the action itself, then you can just use Vます.