Jezero crater, an ancient lake basin that is the landing site of the Mars 2020 Perseverance rover, contains a carbonate-bearing rock unit termed the margin fractured unit. Some of the carbonates in these rocks may have formed in a fluviolacustrine environment and therefore could preserve biosignatures of paleolake-inhabiting lifeforms. Here we evaluate whether these margin fractured unit carbonates formed as authigenic precipitates in a fluviolacustrine environment or via alteration of primary minerals by groundwater. We integrate thermal inertia measurements from the Thermal Emission Imaging System (THEMIS), spectral analyses from the Compact Reconnaissance Imaging Spectrometer for Mars (CRISM), examination of stratigraphic relationships in Jezero crater using High Resolution Science Experiment (HiRISE) and Context Camera (CTX) images and digital elevation models. We also compare the Jezero crater results to observations from the Curiosity rover in Gale crater. We find that margin fractured bedrock with the deepest visible-to-near-infrared carbonate absorptions also has exceptionally high thermal inertia and thickness relative to other carbonate-bearing units in Jezero crater, consistent with enhanced cementation and crystallization by groundwater. Our results indicate that it is equally likely that carbonates in Jezero crater formed via alteration of primary minerals by alkaline groundwater rather than as authigenic precipitates in a fluviolacustrine environment. Jezero crater may have hosted ancient subsurface habitable environments related to these groundwaters, where life-sustaining redox energy was generated by water-rock interactions. The Mars 2020 Perseverance rover could encounter biosignatures preserved from this carbonate-forming environment, whether it was fluviolacustrine or in the subsurface.