The short answer is yes, it can be used for ecommerce.
However, you will need to install an WordPress plugin to handle the ecommerce functionality.
The 3 best ecommerce plugins are:
WooCommerce is the most comprehensive solution, with many extensions which customise the ecommerce functionality.
If you intend on selling a large catalogue of products, stay away from cheaper hosting, which will probably slow down or break your website, and instead get fast & premium hosting.