The answer to the question is Yes, providing its a 1979 or earlier IT175 motor.
The longer answer is:
The twin shock motors and the early 6-speed motors (TY175, YZ125C/X) are wider at one of the mounting points (top rear, IIRC), which requires tweaking to fit.
The later DT175 motors are narrower at the top rear mounting point and need spacers to fit (or you could just crank the bolt up tight and pull the boomerang mount in, I guess... ).
The DT motors of all ages/capacities create hassles with getting an intake manifold/carby to join the DT barrel to the YZ airbox. There's tons of ugly ways to deal with this, but no nice ones.
Other than that, stuff like exhaust pipes and chain pitch and the like may require attention (depending on what you uses), but there's no real dramas there.