In-place editing, while common, is a non-standard feature. A viable alternative would be to use an intermediate file to either store the original, or the output.
sed 'sed commands' > file.out && mv file.out file
# or
mv file file.orig && sed 'sed commands' file.orig > file
...