As everybody so far has told you, this “rule” is quite false. FumbleFingers, J.R. and Matt have given you quite enough counterexamples to prove that.
But it appears that yours is not an isolated misunderstanding. On Google I’ve found half a dozen instances of other students who “remember being told this in school”; it’s enshrined in a mnemonic rhyme: IF and WOULD aren't good, IF and WILL make me ill; and there’s at least one website for english learners, speakspeak, maintained by a man who “has been teaching English for 20 years”, which explicitly prohibits sentences of the same form FumbleFingers endorses. So the interesting question is Where would such an absurd rule come from?
I suspect that this is what I have elsewhere called a “baby rule”, an overgeneralization designed to protect learners from some very common mistake before they know enough English to recognize when the rule is no longer valid.
In this case the reason for the rule is fairly clear. In the first place, its scope is not a sentence but a clause; if you look at speakspeak you will see that the author says that the error is “putting ‘would’ in the if-clause”. And many of the examples there are in fact instances where if … will/would is unidiomatic:
If I will see Peter, I will ask him.
If I would have more time, I would take up golf.
It is quite true that English does not employ will/would in condition clauses in a futurive sense.
This is difficult for speakers of some other languages with different syntax. Indeed, one of the ungrammatical sentences at speakspeak is difficult for many native speakers; it is the parade example of what the British, with more accuracy than charity, characterize as “footballer English”, because it is characteristic of athletes-turned-broadcasters, who are anxious about their colloquial speech and prone to hypercorrection:
If you would have studied more, your English would have improved. ... which should be expressed
If you had studied more ...
Where the rule breaks down is in precisely the sort of sentence which FumbleFingers offers. Speakspeak is quite wrong in holding these sentences to be ungrammatical:
If you will study more, your English will get better.
If you would study more, your English would get better.
The wills and woulds in these sentences, and Fumblefingers’, are not futurive but are representatives of the now obsolete volitive sense of will. In these uses, will originally signified, approximately, be willing or consent:
If you will hand me that hammer ...
If you would be so kind ...
If they will at least meet with us ...
If he would only shut up!
The volitive sense is no longer present in such expressions as these; but because they were not futurive, the form endured and became fossilized in them.