"The transaction log for database 'tempdb' is full due to 'ACTIVE_TRANSACTION'." after adding indexes to temp tables
An index create on a temp table will use space in the tempdb transaction log while the index is being built.  So yes, the index could have caused the issue in the general sense that it added enough transactions to the log file that it ran out of space.

Transaction Log Disk Space for Index Operations