If they’re legitimately tourists, you stop them, inform them that they crossed the border, and escort them back to Canada.
No, if they crossed the border illegally whether by accident or on purpose a border patrol agent that responds has no choice but to detain them. We are law enforcement officers not judges.
If an agent did not detain someone for illegally crossing that agent would be placed under investigation. I have caught illegals a few feet from the border and they sometimes ask if I can just let them go back. The answer is always no.