Unless contractual agreements say otherwise, then yes a pilot can have another job. Even though being a pilot can be an intense job, quite a few people in this career path tend to have other jobs or side businesses. Most pilots love their job, but there’s no denying that it can be stressful so getting a second job can be a great way to escape every now and again.
There are some cases where pilots work two different jobs with two different flight companies which is definitely an option. However, whether you will be able to do this, or not, will depend on the contract that you signed with the first company and if this allows you to work elsewhere while employed by that company.
But remember that being a pilot comes with very long working days. So before you take up a second job alongside being a pilot, consider the impact that this might have on other aspects of your life because it will probably mean that you spend the majority of your waking hours at work.