Yes, I'm sure you can, and indeed I have many times.
14 hours on a flight from London to Hong Kong on many occasions has produced a sleeve or 2 for me, a hat or a good start at a scarf. All that available time to knit while watching a movie is good knitting time.
However I have heard horror stores about people having their knitting ripped off their needles in one swish of a security guard's hands! The indignity of it.
When preparing for airport security, I recommend sewing in a safety line. That way, if needles are confiscated, stitches remain.
I'm a frequent traveller and the following airlines and airports have been successful for me to bring my knitting in my hand baggage. Scissors never in the cabin! I have had straight needles, wooden, carbon, plastic, bamboo and mental too. DPN's and circulars as well. I don't hide them, they are just in my hand baggage.
Although a knitting needle arguably has the same danger level as a pencil, one must remember that it's both up to the airport and airline.
Oh go on, share your knitting selfies on board... Enjoy mine in the loo.