Can a turbofan run without the fan to provide power without thrust?
No, the fan is directly connected to the outer compressor and turbine (N1). There is no direct connection to the inner compressor and turbine (N2), which could run independently, but there is no switch to somehow stop the N1 rotation in a 747 (and I am not sure, if it would run properly anyway).

Some turboprops (e.g. ATR-72) can run an engine without the propeller (Hotel Mode, see e.g. this question), which is connected to the engine via a gearbox. While there are also geared turbofans, you cannot completely disconnect the gearbox from the core engine.

As the other answers have said, it is however possible to build a jet engine without a fan in the first place. The Boeing 747 even has one in the tail: the Auxiliary Power Unit (APU), which will provide electricity and bleed air while the main engines are not running.