Is it legal to obscure the address on V5C(W)1
?
YES
The V5C remains the property of the previous keeper, not the DVLA, and notwithstanding the government's advice to destroy it, they can deface it in any way they wish - especially if they are concerned about protecting their personal information and have given it the new keeper in error:
What should happen is the new keeper just gets the tear-off slip V5C/2 with only the vehicle's details thereon. The previous keeper should inform the DVLA of the changes who then issues a new V5C to the new keeper. (If for whatever reason one isn't issued, the new keeper can use the details from the V5C/2 to apply for one themselves.)
Note that if the dealership had the car "in trade", they are not obliged to re-register it in their name, and presumably they obliterated the previous keeper's details to protect their personal information. This is very likely the case even if they weren't applying the "in trade" procedures but bought and sold the car without re-registering it (a fairly common practice among some dealerships that avoids an official paper-trail and lessens the number of recorded previous keepers which can affect the price).
1 the W suffix denotes the document is the Welsh version.