34 CFR Subpart D covers this topic ("Under what conditions is prior consent not required to disclose information?"). This includes
The disclosure is to other school officials, including teachers,
within the agency or institution whom the agency or institution has
determined to have legitimate educational interests
so that raises the question of whether there is a legitimate educational interest. Additionally, the question is raised as to the status of an SRO (they are not teachers). Disclosure is allowed to
A contractor, consultant, volunteer, or other party to whom an agency
or institution has outsourced institutional services or functions may
be considered a school official under this paragraph provided...
the conditions being that the person
Performs an institutional service or function for which the agency or
institution would otherwise use employees; Is under the direct control
of the agency or institution with respect to the use and maintenance
of education records; and Is subject to the requirements of §99.33(a)
governing the use and redisclosure of personally identifiable
information from education records
I would take this model memorandum as the most likely agreement, though your district may have a totally different memo where SROs are purely security guards. An SRO is to advance the program objective which include "Education of children regarding the role of laws, courts, and Police in society", which is the hook into "legitimate educational interest". This nothwitstanding the part that says that they "are police officers and not school teachers, school administrators, nor school counselors. The officers will assist teachers with classroom presentations on relative topics when requested and able" (there is no principle that only teachers, administrators, or counselors can have a legitimate educational interest). This model memo does not say anything that indicates that the conditions "Is under the direct control" and "Is subject to the requirements of §99.33(a)" are true, but those conditions could be satisfied external to the MOU.
There are some additional exceptions of the "if required by law" type, such as a state law "adopted before November 19, 1974, if the allowed reporting or disclosure concerns the juvenile justice system and the system's ability to effectively serve the student whose records are released"; or, after that date, is "subject to the requirements of §99.38" which refers you to §99.31(a)(5)(i)(B). If that is confusing, here are the two self-referring sections:
§99.38(a) If reporting or disclosure allowed by State statute concerns the juvenile justice system and the system's ability to effectively serve, prior to adjudication, the student whose records are released, an educational agency or institution may disclose education records under §99.31(a)(5)(i)(B).
§99.31(a)(5)(i)(B). The disclosure is to State and local officials or authorities to whom this information is specifically...Allowed to be reported or disclosed pursuant to State statute adopted after November 19, 1974, subject to the requirements of §99.38.
So state law is one possibility; "legitimate educational interest" is a remote possiblity. Massachussetts law does include governmental third party disclosures: 603 CMR 23.07(4)(c)
A school may release information regarding a student upon receipt of a
request from the Department of Social Services, a probation officer, a
justice of any court, or the Department of Youth Services under the
provisions of M.G.L. c. 119, sections 51B, 57, 69 and 69A
respectively.
That does not directly apply to local police, but it is possible that a police officer is operating as a probation officer or an agent of the Department of Youth Services. Under paragraph (e),
A school may disclose information regarding a student to appropriate
parties in connection with a health or safety emergency if knowledge
of the information is necessary to protect the health or safety of the
student or other individuals. This includes, but is not limited to, disclosures to the local police department
Mass. law allows the possibility of treating a police officer as "authorized school personnel" if they are "providing services to the student under an agreement between the school committee and a service provider, and who are working directly with the student in an administrative, teaching counseling, and/or diagnostic capacity" – which is not completely out of the question but is a bit of a stretch (especially in the context of a blanket statement "we share records", not "we may share yours, if you get special counseling"). Tne law also says "Any such personnel who are not employed directly by the school committee shall have access only to the student record information that is required for them to perform their duties", so sharing of all records would not be allowed.