You become emancipated upon turning 18. That means legally. You still need to figure out how to support yourself if you are leaving your father's place for good. Happy birthday.
In order to attend a particular school you need to be a resident of the town where the school is located. A town is usually unwilling to provide services for a non-resident. Thus far, I presume the school has believed that you are a resident in your father's home and are thus entitled to attend. I recommend that you be proactive and start with your school social worker and discuss this problem. Some districts have investigators and you shouldn't wait to politely ask them to accommodate you until after the have conducted an investigation and are ready to hold a hearing to remove you. The school district may permit you to complete the school year, especially if your graduation is imminent.
Otherwise, you will need to enroll in the school at your level in the district where you reside.
A lawyer can help with a residency hearing, but it will be hard to succeed if you live out of the district and they decide they do not want you to stay. The decision is not likely to be personal, rather it will be the Superintendent's or school board policy that controls. On the chance that there is discretion in some official representative of the school district, remain polite.
I wrote this to help you and others who may face issues like yours in the future. I hope you find my response to be helpful and informative. If you do, please click the thumbs up icon. If this is your question and you find my answer to be the most helpful, please click best answer. I appreciate feedback. My answer is not legal advice and does not establish a client/attorney relationship. The question may not be a complete or accurate description of the problem and there is no chance to ask a follow up question. It is impossible to give complete advice without a thorough discussion of the facts, such as we would have during an initial consultation. Further, laws are different from jurisdiction to jurisdiction and are subject to change. So, please, do not act on any information provided without consulting with a lawyer licensed to practice in your jurisdiction who has experience with the kind of issues that concern you.
At 18 you choose where you live. The custody court has no control. As to the school it is usually the district that you live in that controls where you go. I would talk to your guidance counselor about your desire to complete the year in your current high school. I am betting this isnt the first time your school has dealt with the issue.
This information provided is in the nature of general information and in no way creates an attorney client relationship with anyone including the individual who posted the question.
I agree with both responses. If your father asserts you permanent residence is with him, and you've been sleeping at your friend's house because you don't get along with your dad, that still makes his house your legal residence to them (unless you tell them otherwise, which I don't think you want to do, based on your question). But do talk to your counselor for both this reason, and for possible assistance with overcoming your family issues.