Wait wait I dont think posession of cocaine would be a felony, well atleast I dont think a gram would
In many areas possession of any amount of certain drugs is a felony. There is also Federal sentencing guidelines, in which most drugs are considered felonies (if not all).
Have you been charged? Did you even buy the coke?
Please list more details of what happened. Did you end up meeting the guy? Where did the deal itself occur, and what time? How much did you buy, if it you did? What did the cops say? Did they give you any paperwork? Did they get your information? Do you know anything about the person you bought from? Did they get in trouble?
Please list everything that happened. Do you have a record? Are you on papers? How long after the deal did they bust you, where exactly were you form the deal? Did you have anything on you, and did they search you? What law enforcement agency approached you? Did they prove it was X agency?
I would say if you weren't formally charged or anything, you can pretty much ignore this as a scare tactic. But you haven't told us enough.
Many times cops will lie and say you need to snitch just so you incriminate yourself, and don't give a shit about busting others. Many people say snitching is a big thing, but it's not. It's a multiple-thousand dollar operation that requires a lot of dedication and manpower. They are not going to start such an investigation just from some random kid. They only say they need names to help you out so they can make you slip up and incriminate yourself.
Don't say anything, and if this is the real deal you should get a lawyer and have them present at all times when working a deal with the police.
PLEASE DO NOT INCRIMINATE YOURSELF.
Finally, if you really must snitch, do it. You owe nothing to anyone, especially to drug dealers who spread this bullshit propaganda about don't snitching to cover their own asses so you can get fucked over. You're your own boss.
But it sounds like they're just trying to scare you away from dealing with drugs. Kinda like how cops will flash the lights behind you to pull you over, and then when you're pulled over they just continue going.