Is working alone illegal?

No it is not illegal. If that were the case people of various occupations and professions wouldn't be able to do their jobs. A counselor works alone, a massage therapist works alone, an accountant might work alone. As you can see that would be a silly law.