I hate thatcher as much as the next person but if Thatcher said 'brush your teeth it is good for your dental hygiene' would you slate Starmer if he said, I agree with Thatcher you should brush your teeth?
Starmer isn't agreeing with any of Thatchers policies, he is saying that he agrees with the statement; 'The rule of law is the foundation to everything' - as former head of the CPS would you expect anything else? Bear in mind this isn't some mad philosophy that Thatcher herself came up with, the rule of law being a fundamental part of a working democracy predates Thatcher by a long time, she wasn't saying anything new.
Starmer is just playing the game of politics here, he didn't have to reference thatcher, but in front of an audience in Stoke it will probably take votes from the tories and hand it on a plate to Labour