Welcome. My name is XXXXX XXXXX would be glad to assist.
If the attic light is on the circuit, it will be fine to connect a new cable for the vent fan. That insures the line is 120 volts since attic fans can go either 120 or 240.
Just connect your new cable white to white and black to black. Be sure and verify what breaker this is on, if the breaker is 15 amp. then 14/2 cable works fine, if the breaker is 20 amp, then you need 12/2 cable
Just reply when you return if more information or clarity is needed, thanks.