My mum does this ALL THE BLOODY TIME, and has been doing it at least once a year for the whole 15 years since I left home (I see her more than once a year, and most of the time she does check in advance, lulls me into a false sense of security, and then boom, a year later, "I've booked my train to come and see you next month!").
Here's how I deal with it: basically, despite how infuriating it is, I still do want to see her. So, if I have got plans then I revel in telling her very firmly that she'll need to change her tickets and it was a bloody stupid thing to do, and hope that this time the money she's lost on the tickets will make her think more carefully in future (it never does).
But, if I don't have other plans then I tell her "hang on, I'll have to check whether we're going to be there those days because we are going away that month but I can't remember the exact dates, let me check my calendar," then leave her hanging a couple of days before saying "it's OK, LUCKILY we're going away on different dates, isn't that LUCKY for you, so you won't have the cost of changing your tickets!" Then I make an effort to forget about the annoyance and focus on enjoying the stay (until the next bloody time it happens).
But seriously though, if she's a good friend and you enjoy her company then I would make the effort, just find a way of letting her know she really needs to check next time.