Clear["Global`*"]
int[k_] = Assuming[-1 < k < 1 && k != 0,
Integrate[-GegenbauerC[22, -1/2, x]/(1 + k*x), {x, -1, 1}]];
To test equality of assigning values to k
before and after the integration
test[k_] :=
int[k] == Integrate[-GegenbauerC[22, -1/2, x]/(1 + k*x), {x, -1, 1}]
test2[k_] :=
int[k] - Integrate[-GegenbauerC[22, -1/2, x]/(1 + k*x), {x, -1, 1}]
test /@ Range[-9/10, 9/10, 1/5]
(* {True, True, True, True, True, True, True, True, True, True} *)
Block[{$MaxExtraPrecision = 200},
test2 /@ Range[-9/10, 9/10, 1/5] // N[#, 10] &]

Using machine precision can cause problems
test[0.1]
(* False *)
test2[0.1]
(* 3.43597*10^10 *)
However, for the same value even with relatively low arbitrary - precision
test[0.1`10]
(* True *)
test2[0.1`10]
(* 0.*10^22 *)
Consequently, don't use machine precision.
Plot[int[k], {k, -1, 1}]

Plot[int[k], {k, -1, 1}, WorkingPrecision -> 10]

The integral is small but non-zero in the interval
Block[{$MaxExtraPrecision = 200},
int /@ Range[-9/10, 9/10, 1/5] // N[#, 100] & // N] // Quiet
(* {-8.7837*10^-7, -1.61377*10^-10, -3.40942*10^-14, -4.85371*10^-19, \
-9.0857*10^-29, -9.0857*10^-29, -4.85371*10^-19, -3.40942*10^-14, \
-1.61377*10^-10, -8.7837*10^-7} *)
LogPlot[Abs[int[k]], {k, -1, 1}, WorkingPrecision -> 100]
