The real question is, for how long?
Short-term: Sure. A few days or even weeks is doable and shouldn't cause any lasting harm.
Long-term: Only if you have to. There are consequences to your health.
A friend of mine lived for years with nothing but a central line and drinking water.
She had profound medical problems that caused her gut to shut down. She could not digest food and she got down to the 80-something pound range before her doctors finally took action.
A central line is an IV. It's just like a regular intravenous line in your arm (or sometimes leg) except it's placed (usually) in the chest. A PICC line is another possibility. It starts in the arm and is threaded further toward the chest.
These types of IVs allow larger volume of materials through them. The downside is they're harder to put in and they run a high risk of infection. But they're pretty stable. My friend could tie off her tubing, cover the site well, and go out, even do sports (non-contact sports like kayaking).
She was fed with all the macro and micro nutrients she needed. She drank water to provide additional fluids (and because it's really awful not to have any water as your mouth and throat get uncomfortably dry).
Periodically, she had to take oral antibiotics to kill off bad bacteria growing in her gut. It is not healthy to go without oral food that long. She would follow the antibiotics with probiotics. She also had to eat small amounts now and again so her gut wouldn't completely shut down.
Remember, your gut is the main component of your immune system. So, sure, you can live off of IV fluids but you need a functioning gut.