Roughly speaking, there are four choices: info, warning, error and question. They may go by different names in different toolkits, and there may be variations of each type (fatal error vs non-fatal error, for example). In my opinion, almost all dialog boxes should be "info", because that's what they are -- they are informing the user of something. That, or "question" if they are asking a question. Even if the information is "hey, you entered the wrong information", that's not an error, that's information.
The only time a warning should be used is if the user is about to do something that is irreversible or dangerous and should be warned. Even then, it's better to design your app so that nothing is irreversible or dangerous and avoid warning dialogs completely. As a user, you should almost never, ever see warnings in a well designed app.
Error icons should only be used when the program is at fault, never for when the user is at fault. If the user types a letter into a number field, that's not an error, they just need to be informed that the app requires a number. An error is when the computer runs out of memory, or the database is corrupt and the program must exit.
In the specific case mentioned in your question, you should use an information image unless the dialog is asking the user a question (in which case you might want to use a question mark). You're informing the user of a requirement of the application.