Address edge GetMemInfo edge cases (#26021)
### Description
<!-- Describe your changes. -->
This fixes somewhat contrived edgecases that are present in our tests
- input propagates to output
- output is produced by an initializer.
### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
Python API upcoming PR does not pass tests without it.