Can a lawyer check someone else’s ID number in another place?

You can't.

You cannot check other people’s ID card information at will. According to Article 19 of the "Resident Identity Card Management Measures of the People's Republic of China", staff of state agencies or financial, telecommunications, transportation, education, medical and other units disclose the identity of citizens recorded in the resident identity card obtained in the process of performing duties or providing services. If personal information constitutes a crime, criminal liability shall be investigated in accordance with the law; if it does not constitute a crime, the public security organ shall detain the individual for not less than 10 days but not more than 15 days and impose a fine of 5,000 yuan. If there are illegal gains, the illegal gains will be confiscated. If a unit commits the acts mentioned in the preceding paragraph and it constitutes a crime, it shall be investigated for criminal responsibility in accordance with the law; if it does not constitute a crime, the public security organs shall detain the directly responsible person in charge and other directly responsible persons for not less than 10 days but not more than 15 days, and shall also impose a fine of not less than 100,000 yuan and 500,000 yuan. Fines of up to 10,000 yuan. If there are illegal gains, the illegal gains will be confiscated. Anyone whose conduct in the preceding two paragraphs causes damage to others shall bear civil liability in accordance with the law.