A lot of basenjis try out using their "voice" and/or their teeth to get what they want. Each of my basenjis has tried it around the age yours is, we don't make a big deal about it; I usually say something like "I don't think so", in a deep and growly voice, and then we just make sure we follow through to make them do what we originally wanted. I would definitely steer away from hitting the dog, particularly with something in your hand…that is very, very threatening to dogs (more so than an open hand), and it could definitely cause the aggression to escalate.
I am a big fan of using positive reinforcement to get my dogs to do what I want, while making them think it is what they want In this case, if the issue is going outside, I would go out with the dog, and make it kind of a fun game, so he looks forward to it.
Also, be aware that this is THE time for basenjis to be extra hormonal. Even if your boy is neutered there are physiological changes going on in his brain and body to get him ready to breed (if he could)...it does make them a little extra cranky. That is not an excuse, but it is something to take into account.
I hope this helps