A city ordinance is not a crime. It is not even a misdemeanor.
You are correct possession on school property is a felony. However, the original post said you were driving by the school. The street is not school property. It is a public throrofare. IANAL but I'd argue the sidewalk by the school is also a public thorofare and not considered school property.
I don't want even a disorderly persons offense on my record.
By the way I just re-checked the statute and possession on school property is a crime of the third degree (felony).
I think you're both overthinking this.
I never heard of a city ordinance that's a felony.
The only concern is if you carry on your friend's property is he going to call the police and turn you in.