Ideally Not
First mistake should always be forgiven if it is not dangerous for the others. So the teacher should just give a warning for being the tardy first time in the class and if it is a repeated behavior then only a punishment should be given which could be not allowing in the class for being late.