No. Safeguard has never been able to prevent Stealth Rocks, Spikes, or other entry hazards. It only protects the user and allied Pokemon from being affected by status conditions such as Burn or Paralysis. Taunt, Magic Coat, amd Magic Bounce are the only ways to prevent entry hazards on your side of the field. You can also use Rapid Spin or Defog to clear them after they've been deployed.
Hope this helps.