I don’t know if you’re racist or not. Only you can know that, and then only if you know yourself sufficiently well.
Please take no offense, but in my experience, most racists are good, honest, hard-working people who hold no malice at all towards those of other races but instead sincerely want them to succeed. All that’s required for racism are untoward assumptions about those other races.
My family in the MS Delta (including me) were that way — we honestly wanted a better life for all the Blacks around us, and they were our friends and neighbors. We gave them money and clothes and food from our garden every year. We would have been deeply offended if anyone had called us racist. But we were racist indeed. Why? Because as soon as they were out of earshot, out would come all the N-word jokes and assumptions. We didn’t mean anything malicious when we said such things, but we didn’t realize how that kind of behavior (in private and in the company of like-minded Whites) informed our social and political leanings.
In other words, racism doesn’t require malice, and I hope you see in the previous paragraph that I’ve lived multiple sides of the issue.
So when it comes to using the N-word, no, there is NO situation or context in which we can use it wherein Blacks should not be offended. I do realize that doesn’t seem right to you, but here’s a article explaining why in terms I suspect you will agree with.