I think you are getting further confused as you go along
The size of the dome and the focus distance of the camera lens determine if the combination will ever focus
The position of the dome impacts FOV and distortion so the lens may as well focus but the image will look gross if the position is incorrect
the 40mm prime is about 30cm minimum focus distance, again I don't know which Ikelite dome you are using but if it's the 8" dome I would guess the virtual image would be about 30cm away for an object 0.5m away so it only just focuses there and won't focus much closer.
As far as dome position goes it is 23mm long vs 61mm for the Canon 15mm so assuming the fisheye is well placed in the dome the 40mm lens entrance pupil could be positioned about 38mm behind the centre of curvature of the dome based on the difference in lengths.
your 24mm could work but being so short (assuming pancake lens again) could suffer vignetting, but you could test that on land. It will certainly be wider than your 40mm.