The main function of the anus is to discharge the waste and indigestible substances out of the body

The main function of the anus is to discharge the waste and indigestible substances out of the body, in other words poop
Yes, you can live without an anus. You can have a colostomy instead of an anus. A colostomy is a surgical operation where they make an artificial opening for the waste to go through.
The anus works with the digestive system. The rectum stores the waste and is ready to release it. Its main goal is to break down food and store the energy and nurturance.
The anus is a part of the digestive system and the excretory system.