Guiding "along" the path or guiding "to" it
The verb هَدَى is construed in two ways with "the path" (صِرَاط). With a direct object (« ٱهْدِنَا ٱلصِّرَٰطَ »), it means leading someone along the path itself: the translation says "guide along / on". With إِلَىٰ (« هَدَيْنَٰهُمْ إِلَىٰ صِرَٰطٍۢ »), it means pointing him in its direction: the translation says "guide to".
The survey covers the 14 sentences where هدى and صراط meet. Six have the direct object: 1:6, 4:68, 19:43, 37:118, 48:2 and 48:20. The other eight have إلى.
The difference is that between two acts. Guiding along the path means setting the one guided on it and moving him forward; guiding to the path means showing him its direction. The prayer of the Fatiha asks for the first: « ٱهْدِنَا ٱلصِّرَٰطَ ٱلْمُسْتَقِيمَ », "Guide us on the straight path". In 42:52, the messenger "guides to a straight path": he shows the way, he does not make one walk it.
The one who guides is not always God: in 19:43 it is Ibrahim who tells his father « أَهْدِكَ صِرَٰطًۭا سَوِيًّۭا », "I will guide you along an even path". The rule concerns the construction, not the subject.
In the text
ٱهْدِنَا ٱلصِّرَٰطَ ٱلْمُسْتَقِيمَوَهَدَيْنَٰهُمَا ٱلصِّرَٰطَ ٱلْمُسْتَقِيمَوَهَدَيْنَٰهُمْ إِلَىٰ صِرَٰطٍۢ مُّسْتَقِيمٍۢأَهْدِكَ صِرَٰطًۭا سَوِيًّۭا