The website was infected. I have already removed the code pasted in .htaccess and everything is OK. Do I still need to clean the page?

Yes, you need to check the website and clean it if necessary because not everything has to be okay, even if you do not have symptoms of infection for the moment.

By removing an entry from the .htaccess file (JS script injected in header.php, etc.), you only removed the entry that was causing the symptoms of the attack/infection. Therefore, infection symptoms are not the problem. Instead, the main problem is the reason/cause of the malware and how these changes happened.

The main problem is that the attacker was able to inject something into the file or files. After removing symptoms, it remains unresolved, so the malware is likely to return to the site after a short time.