When you rebuilds an index, SQL Server creates a new version of the index elsewhere in the database, so you need the space to fit that new version of the index, even if you will end with more than free space than before.
The alternative would be to export the data with BCP, truncate the table and reload.