Similar to fantasy, anything is possible in science fiction, provided you set it up properly. The main difference between fantasy and sci-fi is whether it’s unexplained magic, related to the environment (such as crystals), or purely technological.
Whichever you choose, make it convincing. Science fiction requires some explanation, usually of a technical nature, even if you don’t go into the details. In other words, it’s likely to involve certain devices. In today’s modern world, it’s becoming more and more difficult to stay ahead of the technology as what was once science fiction becomes science fact. Thus, science fiction seems to be trending more toward futuristic stories, often dystopian, of the consequences of advanced technology.
If you write science fiction, don’t violate the known laws of physics without providing rationale for doing so. Invent new laws if you like, but make them believable. A lot of technical folks are likely to be in your audience and you’ll lose them forever if your science isn’t credible. Noises in the vacuum of space (like the explosions you hear in movies), earth-like gravity on a small asteroid, and unrealistic orbits are some of the things to look out for. If you don’t know something that relates to science, look it up or ask someone who does. Satires (such as “The Worst Man on Mars”) have a bit more latitude.
All fiction needs to be convincing and seem real. Create any possibility you want, just make sure the reader will be convinced. If you’re writing fantasy or science fiction, you need to build a world that your readers will believe is possible. Spend sufficient time creating your story’s environment to a high level of detail and it will pay off later, perhaps in even providing new plot twists.