Yes, but we should pay attention to distinguish between service inventions and non-service inventions to ensure that they have nothing to do with the work tasks of the work unit or other non-service jobs assigned by the unit, and are mainly not completed by using the material and technical conditions of the unit. At that time, there will be no dispute between the unit and the patent application right and patent ownership.
If it is an invention made by oneself in his spare time, it has nothing to do with the unit, and he can apply for a patent as a non-service invention.