"if" and "whether" are used - and either one is correct - in cases like
the first one you mention, which is a yes-no question embedded in a
statement.
Would you like to see a movie? (Yes? or No?)
I asked if she'd like to see a movie.
I asked whether she'd like to see a movie.
Neither "if" nor "whether" can be used this way if the embedded
question is a question which asks for information other than simply
"yes" or "no".
Who? What? Where? When? and How? questions, then, cannot be embedded using "if" or "whether".
I hope that clears up the difficulty.
CJ