Yes you can. If your own company is located in Spain or Italy, this option will appear automatically when creating an invoice.
Go to ‘Invoices’
Create a new invoice
The option for IRPF/withholding taxes will appear
The percentages are the correct ones issued by either Spain or Italy
Select the right tax rate
Fill in the other details of your invoice
Teamleader will calculate the tax automatically
Save (and book) your invoice
The PDF of the invoice will also contain the mention of the tax.