If the government asks, they typically need a warrant. (There are exceptions, but they're fairly narrow). Is there a specific example you're thinking of?
This scenario, though, is Snapchat volunteering the information. It wouldn't really make much sense to require the government to get a warrant to recieve a tip, would it?
And shouldn't we applaud the practice? Sure, in this scenario it was a false positive, but if this student teacher were actually planning to do what she joked about and Snapchat sat on that information, I suspect many of the people poohpoohing Snapchat would be angry that they didn't inform law enforcement.
I have no idea why people are using Snapchat in 2026; it was never as private or discreet as it pretended to be, as you could just take a picture of the "self deleting" message with another device. However, it sounds like people still using it need to demand E2EE direct messages. It worked for Facebook.