Add extension method to compensate for Contains() absence (#13466)
### Description
The targeted framework does not contain `Contains(string, orginal)`.
Add extension method to compensate in following the suggestion
[here](https://learn.microsoft.com/en-us/dotnet/api/system.string.contains?view=net-7.0).
### Motivation and Context
Packaging pipeline fails.