Generally, if a company has received a grant for a project, this will not prevent them from claiming R&D tax relief. They will however, only be able to apply for this under the Large Company Scheme.
This means that if your company has received a relatively small grant your company could potentially lose money overall, as some grants can significantly reduce what your company can claim in tax relief. The difference between what the company can claim under the Large Company Scheme and the potential claim under the SME Scheme could be much higher than the grant itself. This is why you should always seek professional advice when making an R&D tax credit claim.
(See also: R&D Grants)