Maybe not. Ketchup that contains onion and/or garlic powder is unsafe for your dog. Onions contain toxic compounds that break down red blood cells and lead to anemia. Garlic also damages the red blood cells.
Even if you find a ketchup without onion or garlic powder, ketchup is high in sodium. Dogs can become quickly dehydrated if they eat foods that are high in sodium.