The regulations for school nurses vary, but none of them are allowed to prescribe or dispense medication. In some cases they are able to administer them though.
Nurses that work in schools are not allowed to dispense topical antibiotics or cortisone creams. Unless approved by a doctor and parents of the child. In sever cases the nurses duty is to keep the child under control until a more certified person, such as a doctor or ambulance crew comes to take over.
In some states and school districts, the nursing professionals that work in schools are not allowed to give person advice to young adults such as abortion advice or referrals. Such advice could result in legal actions by the parents and the nurse could lose their job.
A lot of schools do not allow their school nurses to give any birth control or other contraceptives. They are only allowed to teach abstinence. This goes along with distributing medicines too. The nurse could schedule an appointment with a doctor where later the patient and their parents could discuss the situation, and prescribe medicine if it is necessary.
Diagnosing illnesses and injuries is one of many jobs for nurses that work in schools. When a child comes in sick or injured it is their job to diagnose the problem, and then if the problem is serious enough recommend visiting a doctor for further inspection.