Rushed laws that allow police to ban protest marches following terror attacks could prove to be divisive rather than calming, a senior legal figure warns.