Short answer: not the way you're hoping.
Problem is, React is Javascript, and your CSS is not handled by Javascript.
You could be saved, if you're compiling CSS - from SCSS for example - you could create a file ie. env-vars.scss, and have it define a variable like $basePath, setting it to /my-cool-path/. ( like $basePath: "/my-cool-path/";)
Import that file into your main scss file, and have git (or whatever repo you use) ignore the file. Then you can manually recreate that file on the server, setting the $basePath to / ( $basePath: "/"; ).
You can then use the $basePath in your urls in scss, say for example background-image: url($basePath + "img/some-background.png");
When ever the scss is compiled, it'll pull the var from that file, and if your repo is ignoring it, you can create different values depending on the environment you're running the compile on.
However building with react-scripts start and react-scripts build might also provide you a way to set an ENV variable and import it into your scss, but I'm not entirely familiar with this so I'd have to direct you to google for that one I'm afraid.
If you're not compiling your CSS from a preprocessor, it'll be a tougher task.