I'm sorry. Likely I mistook your question. Now I understand what you are asking. Your question is if you can say "I had to do something" for the case when "I" actually didn't. Right?
Well, this is a bit tough question for non-native learners like me. But I vaguely remember someone told that the expression "had to do something" commonly implies the action was really