Tory moderates warn PM if could face defeat in Commons and Lords if he tries to ignore international law to save controversial deal