I did a test and did a rebuild of a clustered index 4 times. 2 times offline and 2 times online. On both occasion, the online required about twice ad much space in the transaction log. Also, if you have users modifying the data while the index is being rebuilt, then you need space in tempdb for that.
If you were on SQL Server 2019, you could do a resumable index rebuild. Stop it and truncate the log while it is paused.
I, of course, assume full recovery model, since index rebuild is minimally logged in simple and bulk_logged.