Ignore and dismiss are not synonyms and can hardly ever replace each other.
Ignore = skip without paying attention
You see something and immediately decide to not pay attention to it, which means you ignore it.
"I recognized him on the street but ignored him." (which means, I saw him and just went past him without saying anything)
"He ignored insulting remarks."
Dismiss = check and discard
You hear something, start to think about it, but then recognize it as unworthy, so you "cease to think about it", which means you dismiss it.
"After a short discussion, he dismissed the idea."
"Dismiss" is often used when dealing with people.
"The teacher has dismissed the class." (which means let them go after the lesson is finished).
"There are more and more reports that patients are being dismissed by
their doctors." (which means a doctor had some patients, who visited him
several times, but later he decided he doesn't want them as
patient any more, so he dismissed them).