I'm not sure this didn't happen
This is a grammatically correct sentence. However it has a very different meaning to your alternative sentence which was correctly stated as "I'm sure this would not have happened" by DesertLion.
So your friend may be saying that "I'm not sure this didn't happen" is incorrect because it does not accurately describe your intended meaning.
The only way anyone here could comment on which sentence accurately conveys the intended meaning is if the context is described. Without further contextual information either or none of them may be "correct", it is impossible to say.