Out of courtesy I would always politely ask beforehand, and my daughter and I spoke about how and when she should do this with Liam Payne, so not to make his flight uncomfortable (just before de-planing we decided). I also told her to accept the answer politely, whatever it was.
However, I am also with Jerry Seinfeld here*...being famous means you in part belong to your public - you rely on that interest in you to make your career successful, so you should accept a certain amount of attention when in public with good grace. It says a lot about the celebs who don't - usually the Z-listers (you rarely hear a bad word from anyone who's bumped into Tom Cruise).
*See his episode of Comedians in Cars Getting Coffee with Zak Galifianakis.