Can statistics affect the query logic instead of performance? Is it possible that the frequency of rebuilding indexes (which automatically triggers statistics update) can affect the query logic?

One of the developers I work with claims that a stored procedure failed (there was a type conversion error) because the statistics have not been up to date during the query execution and it used the wrong query plan. He also claims that after having updated statistics the procedure works fine.

Is it even possible?
At least I think it is possible that the procedure gets a different plan and that way it doesn't touch the rows that have "invalid" data, for example numbers or dates stored as varchar that aren't correct and then conversion logic in the procedure.

For example if you're fetching with both date range and customer code, and some of the data for that customer causes the error, but is outside the date range -- so, if the plan uses date range, it works ok, but if it fetches all the rows for the customer, then does something related to the conversion and then last compares the date range, then it fails.

I haven't tested this, but I would assume that could happen, but of course the data / procedure should be fixed.