No word about Knuckles’ was first heard publicly recently, but there were rumors about him joining the cast. Tails was confirmed to be joining the cast due to the stinger in the first movie, but Knuckles was a surprise.
In the games, Knuckles was an ally and sometimes an enemy of Sonic, but that depends on the situation. He was tasked to protect the Chaos Emeralds so if these were in danger, he had to fight those individuals, even if they were friends. No details yet on what his role will be in the sequel, so stay tuned.
Sonic Movie 2 will be released in April 7, 2022. And yes, he may perhaps, know the way.