No doubt that you have stumbled upon some of basic element of writing. The concept of "good writing" blurs the distinctions between narrative, expository, and persuasive. Naturally, there are some attributes of each that are present. Few would deny that. However, good writing that tries to convince a reader of an authentic voice is going to be persuasive, even in an expository format. Good writing, then, is something that stands on its own.
I do think that you might need to take some steps to make sure that you are giving what your teacher wants. In the end, they are grading and assessing your work and it is important to make sure you put forth your best effort in this realm. One distinct undertaking is to make sure that your expository essay involves a reliance on facts and analysis. It might help if you sought to eliminate the use of "I" and personalizing the expository essay. In a persuasive, you are able to appeal to your own sensibilities in trying to persuade your audience. In an expository piece, you want to stick to the facts and stick the analysis you are trying to present. For example, if you are to write about a work of literature, your expository piece would highlight scenes, lines, characterizations and you would be sticking to these. In a persuasive piece, you might be permitted to add in your own analysis to these, something that might not be as openly embraced in the expository piece. In the expository piece, your thesis statement is probably going to be centered on the work, in general. In a persuasive piece, your thesis is going to be based on point of view of which would like to convince the reader. Keeping some of these elements in mind might help you keep your piece strictly in one domain.
The final solution here would be to offer up drafts of your work to your teacher. This is going to be dependent on what the teacher says, but I cannot imagine anything wrong with you asking the teacher to review some draft of your work to make sure you are on the right track in terms of expository vs. persuasive. It's a good point you make in that the line between them can be blurred easily. Good writing tends to do that. Asking your teacher to help clarify will help you be clear and probably help out your grade.