Not solo. I believe solo is ranked. You can only play private custom games UNRANKED. But you have to specify that yourself.
Even if you use custom games or unranked you can still get banned using cheats. The only way to ensure you don't get banned is to not be connected to the servers or to steam because vac will detect pretty much anything that is injected or any memory editing programs.