I am trying to find out if it is possible to edit a file in a single sed command without manually streaming the edited content into a new file and
You could use vi
vi -c '%s/foo/bar/g' my.txt -c 'wq'