You can certainly ask. Most administrators try not to keep someone that does not want to be there. Finding someone to fill your job after you leave will obviously be their biggest concern. If they beieve they have a plan to finish the year they may let you go. If not they have every right to not release you. If your new district really wants you they may be willing to hold the position for you.