Fix validation for external data paths for models loaded from bytes (#27430)
### Description
This PR fixes the validation of external data paths when ONNX models are
loaded from bytes (in-memory). Previously, when a model was loaded from
bytes without an explicit external data folder path being set, path
using ".." sequences were not properly validated, potentially allowing
access to arbitrary files on the filesystem.
### Motivation and Context
Address a security concern