Apple Snails can breed in tanks, and I've got several that were born in my tank, but they are less likely than other snails to have a population boom. This is because their eggs are laid above the water line in super obvious pale pink clumps that are easy to notice and remove as long as you give the lid and places above the water line a check each day. They also require both a male and female to produce young, and while females can store sperm you usually won't get many fertile batches of eggs if you just get one snail. I easily keep my snail population from growing more by getting into the habit of checking for eggs each day. If I find an egg batch I remove it, put it into a ziplock bag, and then add bleach to kill the eggs before throwing them out so they don't hatch and cause environmental issues.
Here's an example of what the egg clusters look like:
https://www.buildyouraquarium.com/wp-content/uploads/2020/03/freshwater-snail-eggs.jpg
Apple Snails will not eat other snails. They leave other invertebrates and fish alone, and are very peaceful overall. Apple Snails will nibble on algae a bit, but not to the point they will make any visible difference in an algae problem. If you want a snail for algae eating, a Nerite Snail would be a better bet. Amano Shrimp also make good algae eaters for small tanks. Both Apples and Nerites Snails also do best with sinking foods and blanched veggies rather than surviving just off leftovers.
You should make sure you know what kind of Apple Snail they are selling as well. They can range in size from a softball that would fully stock a 40 litre just by itself to ones just a couple inches at full growth where you could fit a few in a 40 litre. These are also not low-bioload critters. Even the small species poop a lot. Their lifespans can also have a big range based on species. The most popular type over here, Pomacea bridgesii, only live for a year to a year and a half. Which is too bad, because Apple Snails tend to be especially endearing. They have their bodies and antennae out of their shells more than other snail types, and they are very active and entertaining little guys.
Since they do tend to have their antennae out all the time, they should never be kept with fish that would nip them - fin nippers are also not safe for tank mates for Apple Snails. Most Loaches and Puffers will eat snails, so you also need to make sure the tank mates are specifically snail-safe. Like many ornamental snails, Apples need a pH of 7.0 or higher and water of at least moderate hardness to live well and develop healthy shells. They need a calcium supplement, like a thumb-sized piece of unflavored cuttlebone, added to the tank. Cuttlebone floats at first, but will soon become waterlogged and sink. The snails will rasp off some whenever they need calcium. Apple Snails are also escape artists, so make sure that there are no gaps in the lid they can escape from. Be especially careful about gaps by the filter outtake, as they will climb right out of those if you aren't careful. Also keep in mind that Apple Snails are sensitive to certain medications, especially anything containing copper, so you'll have be a little limited in types of medications you can add to a tank containing them.
https://www.applesnail.net/ is a good source of info about Apple Snails.