Yes. You are allowed to brush your teeth on the plane. You can brush your teeth in the plane toilet, and this may especially be recommended on longer flights.