At school you may find yourself in trouble if you start throwing your fellow students around, even if it's in self defence
Instead, work on your ability to get yourself off the line of attack and out of reach. Then you can encourage the attacker to over-reach himself, and stumble or fall, thereby making himself look like the clown he is
If anybody says anything, you can then say (with witnessess) "I never touched him"
The same applies outside of school, where a weapon is more likely to be used. You are much safer being out of the strike zone then staying in reach and trying to block the attack.
Talk to your Sensei about it as well - he can help you to practise for these situations
i would usually try. but my opponent always gets to riled up and throws a punch. im just worried i wont be able to use aikido im only yellow belt but i got my orange belt grading in 3 months. and i want to be able to have the mind state to use it when the need arrives