I have another commitment on Sunday. I help poor young people to learn English at a non-profit (Catholic-sponsored) school. I leave before the final blessing (sometimes right after Communion) in order to be in class punctually. If this is wrong, I hope someone will tell me. Sometimes I can make Mass on Saturday for Sunday. Sometimes they have a wedding, and the Mass is not a Sunday Mass.
While it can be okay to occasionally leave Mass after Communion for just cause, it should not be a habit because to habitually leave Mass early can cause scandal to others. Rather than leave Mass early to get to your class, try finding another Mass on Saturday evening or Sunday to attend that doesn’t conflict with your class. A nuptial Mass on a Saturday afternoon would fulfill your Sunday obligation.