If you type in a students email, and the email is not at your school, Teams may not prompts you to invite them. 


This is due to a configuration setting on the server : if 'Guest' access is not enabled, then only students who have the same email address at the school are allowed to join. 


On iLearn, guest access has now been enabled. At other schools, this may not have been allowed, so you may not be able to invite students via their gmail, outlook or other emails. 


Please consult with your school IT.