Yes, it is an adverb - or if you like an adverbial. For your purposes it doesn't make much difference. Expressions like last night
are usually described as an adverb (or adverbial) of time.
Adverbs/Adverbials are a bit of a grammatical ragbag made up of any word, phrase or even clause which modify another element in the sentence, or even the whole sentence itself. So for example :
She danced beautifully
is an adverb of manner, modifying the verb phrase- it tells us how
She danced last night
- last night
is an adverbial of time, made up of an adjective (last
) plus noun (night
) which modifies all the preceding elements: it tells us when
she danced beautifully.
We could add other adverbials, for example :
1. An adverbial of place : She danced beautifully at the theatre
2. An adverb of frequency : She always
3. A disjunct which comments on the content of the clause and modifies all of it : Frankly
, I thought she danced like an elephant with two left feet last night.
etc etc - but I don't want to go too far from your question.
Have another look at your dictionary - I suspect it was telling you that last
was the adjective, not the entire phrase. But if it really said that "last night/week" was an adjective, then throw it out and get a better one