you can get .away with playing anything in my opinion, as long as you phrase it appropriately. Playing notes that are out of key is where the oportunity for being artistic exists if we all played strictly within the church modes music would have considerably fewer permutations. If you listen to some Ritchie Kotzen, you'll hear he spends a fair bit of time wandering off key (I think they call it 'Jazz' :p ).
Resolving chromatics back to an underlying chord tone is a well established technique as a for instance - the harmonic minor modes also offer potential for substitution. It might be 'off key' strictly speaking, but there's usually a way to make it fit...
Check out my music, video, lessons & backing tracks here![br]https://www.renhimself.com