The original poster on reddit seems to have come to a conclusion to their question only a couple of days after posting it, and I've not found anything that seems to contradict their conclusions.
Here's a better shot of one of the locations which had a photograph in the OP:
These are the sample tubes being loaded into the rover. You can see the clear gas line terminating in a right-angle connector at the mid-top of the image.
Reddit user n4ppyn4ppy believes that this is a purge line to keep the sample area free of biological or chemical contamination in the period leading up to launch, and in the absense of any other obvious externally-routed gas lines this seems to be a reasonable conclusion.
From Mars 2020: mission, science objectives and build,
T-0 purge implemented for the ACA volume after installation of the sample intimate hardware assemblies19. The Mars 2020 spacecraft includes a purge line for the Adaptive Caching Assembly volume. This T-0 purge was started when the Sample Tube Storage Assembly and the Dispenser, Volume, Tube Assembly were installed into the Perseverance Rover and the ACA cavity was closed out with the Ejectable Belly Panel. The T-0 purge was maintained until spacecraft launch. The nominal flow rate for the purge was 1 L/s. This high flow rate necessitated using clean, dry air rather than GN2 for most of the purge period to avoid safety concerns with asphyxiation. Purge gas was filtered to 0.003 μm for particles and to 0.1 ppb for molecular contamination.
Whilst there are various other documents that talk about the existence of the purge line and what it does (eg. Mars 2020 Sample Caching System Contamination: How to Clean Hardware and Keep it Clean) there doesn't seem to be any published diagrams or discussion of the purge line itself; probably it just isn't interesting enough.
Incidentally, there are other rover components that have gas lines, notably MOXIE, but those lines are not routed over the outside of the rover, because there'd be little point (assuming the rover had been designed sensibly in the first place). Here's an image of the port side of Perseverance (why port I don't know; it isn't a ship!) which shows the HEPA filter for the MOXIE inlet, for example.