Britain may need anti-subversion laws to counter threats from states determined to undermine democracy, a government watchdog has said.