When is it okay to dob on someone?

Short & Curly - A podcast by ABC listen

Kids dob to parents and teachers for all kinds of reasons.  It often feels bad when someone tells on you.