In the following sentence which should be preferred:
I would rather you took/take a car instead of walking in the street at night.
Can both be used in this context? To me "take" seems more correct, but I cant be sure.
Both versions are acceptable in modern English. In the past, took was preferred. Here is an Ngram.
Because the take construction has only recently gained ground versus took, it's the version more likely to appear in informal or slang usage, and consequently took may sound archaic to some.
It also may sound a little peculiar to a conversational ear to use a past tense for the verb in a clause which you're making a statement about the future, as you're saying you don't want this behavior to continue.
But don't think that took is wrong by any stretch. This is a fun construction because it simultaneously makes an irrealis statement about both future and past events. Which one do you want to emphasize? Let that be the deciding factor for the choice between took and take here.