It used to be that English had a well-defined subjunctive, and that it was wrong to say “if I was a rich man” (the correct variant being “if I were a rich man”)
But the language is changing. Most dialects are losing the subjunctive and just using was in both cases. You will hear native speakers use both. Older people are more likely to use the subjunctive, and some dialects have preserved it better than others. Both are considered acceptable in most contexts, so I don’t think it qualifies as a mistake either way.
In non-hyptothetical sentences like “I was hungry”, where “was” is the only acceptable form, we don’t usually make mistakes.