"Emulator" is the wrong word, but the answer is yes. The word you actually meant was "re-implementation" - writing a completely new, clean-room program which reads Source data files (levels, assets, scripts) and allows the user to play a Source game is perfectly legal.
It is necessary to avoid distributing any copyrighted material, so the user must provide the game assets from a legitimate copy for using the program to be legal. In addition, the 'clean-room' must be maintained by ensuring that no contributors to the re-implementation have ever seen the source code for Source, or they become tainted with forbidden knowledge.
Indeed, it's quite common for beloved old games to be re-implemented on new codebases to allow easy play on modern OS's and at high resolution, etc.
See https://github.com/Interkarma/daggerfall-unity, https://openrct2.io/, https://github.com/AlisterT/openjazz