If you are given notice, you were informed about it that amount of time before it was occurring. So yes, in that sentence, it means you will often receive the invitation within a couple hours of the parties start time.
"I gave my boss two-weeks notice that I was quitting." - You informed your boss you were quitting 2 weeks ahead of time.
"Young people often invite their friends with one or two hours." This second sentence does not make any sense to me. Provide more context to see the author's intent?