“Sure it was a friend?” Not an appropriate question for someone I'd just met, but I didn't want her to keep meeting her abuser.
(I wrote this myself.)
Is it gramatically correct? If not what's a better alternative?
In formal writing your sentence would be incorrect. You are missing both the subject and the verb. The sentence should read, "This was not an appropriate question for someone I'd just met..."
However it sounds like you are trying to communicate the thinking that was going on inside the narrator's head and also trying to use a conversational tone. If that is the case, then it is acceptable to use a sentence fragment as you have done.
It seems fine to me. Maybe adding some adverb will work: Not an entirely appropriate question...