Ratting out in my mind means informing authorities in a way that something negative might be expected to happen to the subject.
For instance, I don't think smoking weed is wrong, but if I go tell an officer you have weed in your car, I have ratted you out despite nothing 'wrong' happening.