2wd with automatic transmission and rear wheels dollied, yes.
2wd with automatic transmission and front wheels dollied, no.
2wd with manual transmission in neutral, front or rear wheels dollied, yes.
4x4 with automatic transmission, no, you must drop the driveshaft of whichever wheels aren't dollied.
4X4 with manual transmission in neutral, best to dolly the front, but the rear can be dollied as well (make sure the transmission and the 4wd switch are both in neutral).
Bottom line: No matter the vehicle, the safest way to tow, bar none, is to drop the driveshaft to the wheels on the ground.