You can use sf::Texture::loadFromMemory to achieve this. This function takes a byte array and the array's length as parameters. If you hard-code the array with the binary data for your image, you'll have essentially embedded the image into your code.
An example from my code:
cursor.defaultTexture.loadFromMemory("\x89\x50\x4e\x47\xd\xa\x1a\xa\x0\x0\x0\xd\x49\x48\x44\x52\x0\x0\x0\x6\x0\x0\x0\x8\x8\x6\x0\x0\x0\xda\xc6\x8e\x38\x0\x0\x0\x37\x49\x44\x41\x54\x8\xd7\x65\xcc\xd1\xa\x0\x20\x8\x43\xd1\xbb\xfd\xff\x3f\xdb\x4b\xd9\x32\x41\x90\x1d\x19\x40\xed\x7d\xc6\x0\x55\xc5\x44\x9f\x63\xa2\xf3\x2b\xd1\xb3\xfb\xe0\x7\x92\x6e\x95\xa4\xe\xda\xb3\x25\x61\x1\x50\x1f\x13\x6\x81\x80\xaf\xc6\x0\x0\x0\x0\x49\x45\x4e\x44\xae\x42\x60\x82", 112);
That long string of hex values is a char array representing a small PNG image, and 112 is the number of bytes in that array, i.e. the original file's size.
I'm not aware of any existing tool that converts arbitrary files into byte strings like this, so I wrote my own in JavaScript that converts files into escaped hex strings like the one above. You can find it
here. It runs in the browser, but I recommend saving that page so you can run it locally.
I only recommend doing this for very small, fixed files, the bare minimum needed to communicate to the user that the main data failed to load in the event that happens, or only if the sum size of your images is very small even when decompressed into RAM and VRAM. Including the art in your code means that the data can't be loaded and unloaded dynamically, which increases your RAM/VRAM usage. For games with larger or many textures, this can lead to running out of memory even on good hardware.