His lawyer said on Friday that he deeply regretted the attack and had not meant to kill the teacher, in comments to TT news agency.
The boy is accused of attempted murder after allegedly going to the school wearing a mask on Thursday and stabbing the teacher.
The attack led to panic among other students, with many jumping out of windows in fear. None were injured.
The boy was detained by the police shortly afterwards.
In a stable condition
The public prosecutor's office did not provide any information regarding the motive for the crime.
The victim had initially been described as a member of staff, before it was confirmed on Friday that a teacher had been targeted.
The man, in his 40s, is in a stable condition, a police spokesperson said.