Hubble weighs closest white dwarf says the BBC. Only it didn't. As the first sentence of the article says, it was used to measure the mass.
As weight measures the force of attraction between two objects due to gravity then, especially when talking about space (where the acceleration due to gravity varies), it is not interchangeable.
Update: perhaps unsurprisingly, they've now corrected it.