Yes, teachers are not obligated to write letters of recommendation for their students. It's important to choose recommenders who know you well and are willing to write a strong letter.