The 74LVC1G07 is open-drain, but I don't find anything in the datasheet that tells whether or not it can handle 12v on the output ("Y") pin.
According to table 5 of the NXP datasheet device can only handle 6.5 V.
For other manufacturers it will make little difference and these also will not support 12 V since this concerns the 74LVC.... series which are intended for a maximum of 5 V typical supply voltage so with tolerances etc. the maximum allowed voltage will be 6.5 V.
If you need 12 V tolerance you will have to use a different IC if that exists or an inverter and an external NMOS which can handle 12 V.