One possible dialogue could be:
Teacher (staring at the student): Who forgot to bring his book? (was it) you?
Student: No, it wasn't me!
This is kind of an informal situation. Formally speaking, it should be "it wan't I", but this utterance is rarely used nowadays. It really depends on the background. This is also possible:
A: Did you forget to bring your book?
B: No, I didn't. This book is mine.
The student can even reply "not me!", which is very informal but widely accepted.
Hope this helps!