@Nguyen, Tee Thanks for reaching out.
The error just means that the device was also being managed by Intune service (MDM) and thus it cannot directly just leave using the command you typed.
That command in turn actually initiates a unenrollment from the MDM service and after 5-10 minutes you should be able to run the same command just fine.
Run the same command again and let me know if you face any error. If you do get any error, you will need to manually delete the entry for this device from Intune portal.
-----------------------------------------------------------------------------------------------------------------
Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.