Yes, of course. There is a few conditions including that the DB has to be read-write. Also CREATE DATABASE article says
FOR ATTACH_REBUILD_LOG requires the following:
A clean shutdown of the database.
All data files (MDF and NDF) must be available.
This operation breaks the log backup chain. We recommend that a full database backup be performed after the operation is completed. For more information, see BACKUP (Transact-SQL).
One needs to read on the topic and test in Dev first.