can you get banned for cheating in a non-rated game?


Yes. I played someone in an unrated game. I suspected foul play, I reported them and they were banned.

If your friend agreed that you can use engine against them in an unrated game, you won't get banned.
https://support.chess.com/article/317-what-counts-as-cheating-on-chess-com
That said, cheating discussion is not allowed in the public forums. If you will like to discuss about cheating, you can join the Cheating Forum Club - https://www.chess.com/club/cheating-forum