It depends on what the writers want.
But as far as a technical explanation, I'll give this a try: no. Artificial gravity on a ship is produced by small emitters in the floors (and the walls for dampening inertia). The only tool a ship can use to do that off the ship is the deflector dish (I believe this was done in Star Trek Generations when the Enterprise-B saved the El-Aurian ships out by Pluto). The deflector dish can create very, very big gravitational fields, but don't have the "resolution" to create low-level fields that can be survived by life forms.not directly, however, if the receiver ship's power systems are intact, they can project the power necessary to generate gravity with the other ship's generators
This assumes that one finds a starship out in space with such a condition which is unlikely because in order to travel safely at FTL speeds inertial dampeners must be used. These dampeners prevent the crew from being splattered all over the walls.
Artificial gravity is usually the last system to go. It also had superconductive magnets in its power system, so it could stay on for eight hours after it lost power.
Inertial dampeners are necessary for impulse speed, not for warp speed. The ship doesn't actually accelerate itself to FTL speeds (this is impossible), it creates a bubble of space and that bubble is accelerated without the crew of the ship feeling anything.