If the ministry agreed to cancel the grant and did not ask you for the money that you received, that is up to them. But you should make sure that they will not ask for the money in the future before you decide to spend it or use it for a project.
If one year has passed since you acquired this money and it reaches the minimum threshold (nisaab) by itself or when added to other wealth such as gold, silver or cash, then you have to pay zakaah on it, even if you are required to return it or have decided to do so. So long as it is in your possession when the year has passed, then it is obligatory to give zakaah on it.
It is permissible to enter into a partnership with someone who deals in riba or whose capital is a riba-based loan, because the correct view is that his ownership of what he has borrowed is valid, although he is committing sin by dealing with riba.
And it is better to enter into a partnership with a righteous Muslim who keeps away from this major sin.
For more information please see the answer to question no. 48005
And Allah knows best.