Yes, you can do it. But, you need to ensure that it will not cause any harm to the main drainage system. In some conditions, you may need permission from the dignified authority.