Yes a scared mouse can squeak when they are scared and the squeaking also alerts other mice to the danger the mouse might be facing.
Mice squeak as a way of communication with each other so that is why you might hear mice squeaking at night or during the day when they are active and could keep you awake.
Mice also make an ultrasonic sound that is so high in pitch that human ears cannot hear them unless you had some device to hear the ultrasonic sound.
During mice sex the male mice also sing a complex song during sex and the female mice chirp when around other female mice and the baby mice also squeak when the mother mouse abandons them.