I wanted to get a shiny Ralts from DexNav, but it said there wasn't one. Then, another Pokémon with a popped out of the grass. I don't know if this breaks my chain. If it does, can I avoid it?
No encountering another Pokemon besides the one your looking for does not break your chain. You can tell by the Pokemon's level getting higher as you keep doing it
Unless the Pokemon you encounter is not rusting grass
Source Dexnav hunting skorupi