Yes, it is possible to get a negative pregnancy test in the morning and a positive at night.
Keep in mind that while false negatives happen fairly frequently in early pregnancy, false positives almost never happen. If you get a positive pregnancy test, it’s almost 100% certain you’re pregnant.