There are specific restrictions imposed by the EU, though most of these are based on historical taxation. Since 2001 sanitary products have been subject to VAT at a reduced rate of 5%
The BBC covered this in a reality check around the time of the Brexit Referendum.
Reality Check verdict: EU rules mean the UK cannot reduce VAT on goods and services below 15%, the standard rate of VAT in the EU. The standard rate of VAT in the UK is 20%, so the government could reduce it by up to 5% today if it wanted. Domestic fuel is on a special list of pre-approved goods and services that are subject to lower VAT rates and it would require the agreement of all other EU members to reduce it further.
Further reduction of the VAT rate, including to 0%, is also allowed but only for the goods which were taxed at that rate before 1991 and since then.
The UK could reduce VAT on everything to 15% whilst still an EU member, but specific exemption only exist for things that were taxed at lower rates and have continually been taxed at a lower rate since 1991 (At least that is my understanding of the last sentence in the quote).
Tampons were not taxed at a lower rate in 1991 and so do not come under the exemption. The "Tampon Tax" is not an EU invention, its a label applied to a specific state of taxation that has always existed. The article goes on to say that the EU intended to introduce a mechanism to allow new exemptions and that the Tampon tax was specifically under review.
The EU is currently dealing with allowing the UK to lower the VAT on sanitary products to 0%. The EU finance ministers have endorsed the plan, which the European Commission pledged to finalise in 2016.
However, since 2016 nothing seems to have happened in this specific regard.
The commons library notes that the UK and all EU members can lower the VAT on sanitary protection specifically. The UK can and has used this to lower VAT on sanitary products to 5% since 2001.
However, the UK’s discretion in determining the structure of VAT, as with all Member States, is limited by European VAT law. Although the current EU agreement on VAT rates allows Member States, should they choose, to charge a reduced rate of VAT – between 5% and 15% – on sanitary protection, the introduction of a new zero rate would contravene these rules.