Wrong. Extras can have dialogue, happens all the time. Especially common in Sam Raimi Spider-Man movies and Russell T. Davies Doctor Who.
An "extra" is a specific type of performer, also called "background actors." These actors, by union rules, can have no dialogue what-so-ever. They, therefore, receive a lesser rate of pay than speaking actors and no on-screen credit. Someone who has even a single line of dialogue is, by definition, not an extra. Extras are the only performs who can, under certain limited circumstances, be non-union. That's why those who get "walk on" roles -- like Prince (now King) Abdullah of Jordan on Voyager -- never have a line of dialogue.