It looks like a PCV one way valve to me. Prior to replacing it, it would be best to determine as to what direction the gases flow. What car is this BTW, looks like a Toyota of some sort.
Toyota Tamaraw FX, 5k or 7k engine.
yep, one way nga lang, may bulitas sa loob,
continously ticking when the engine is on.
Part on the left looks like an EBCV(electronic bimetallic switching valve) usually used to control purging of the charcoal canister of the evap system