Like it has already been said, it is not required, for a webhosting company to be an ICANN registrar. It is also a different job.
You can in fact be just a reseller of any ICANN registrar providing such option (and there are many of them) or just even buying the domain name at any given registrar for your clients.
It technically works and create the same end result.
Being a registrar gives you direct access to registries, that is gTLD registries since you speak about ICANN because for ccTLDs, since they are not governed by ICANN rules you do not need to be ICANN accredited for them, you need to be just accredited by the given registry.
With that access, using specific software implementing the EPP protocol, you can directly send orders to the registry to create, update, delete, renew and transfer domain names.
You will pay the registry their selling price, like any other registrars.
Some registrars sells themselves domain names for a price only slightly higher than the registry one. So on a pure cost basis it could be more relevant to be a reseller (until you reach some critical volume), but of course it then means there is an additional third party in your relation with your clients and it also means that your provider (the registrar) is in direct competition with you, as almost all registrars do provide webhosting services.
So becoming ICANN accredited can be a target. As you already found out there are various costs for that, starting with ICANN directly. You have costs related to being accredited, once for all, then you have ongoing costs as long as you are accredited, both fixed yearly and also per domain.
But you have many other costs you need to take into account, making the whole picture typically interesting only when reaching like 10 000 domains (ballpark figure of course):
- you of course need some software to speak EPP to registries, so either build it (costs of development) or buy it (and there are not a ton of option; BTW I'm the author of an open source EPP client, but it is just a library, not a whole software that you can plug to have immediately all features, so not enough just by itself)
- you need to pay and maintain the servers that connects to registries, as well as securing them, buying X.509 certificates for TLS communication with registries (EPP works over TLS), etc.
- for sunrises periods and things like that you need to have access to the TMDB. For that you need to be accredited and pay some fee
- you also need per ICANN contract to have some escrow of all your customers data, with some escrow companies accredited by ICANN. Again, some fees to pay regularly to this provider
- you have also to cater for insurance, legal fees to draft your agreement with customers, etc.
- and still many other things.
So it is a difficult decision/process and this is also why some companies exist just to help being accredited. Deciding when to be accredited depends on a lot of factors. I would suggest however that for a new business you should instead spare your money and use it to build a good relation with some registrar of which you could be a reseller.
When you will grow big enough and want more control on things then there will be time to think about being ICANN accredited, and also accredited with other ccTLD registries depending on your goals (ccTLD registries may also impose you some yearly fees or minimum amount of volume, requirements on where you are located, etc.)