i assume that doing what i have done would mess up the other variable.
As long as the underlying char array is large enough there is no problem.
In modern code we would always pass the total size of the underlying char array to a function to ensure we don't overrun it.

The thing that is wrong with your version of PrependString (besides it misleading name since it is prepending a digit character, not a general string) is that it does not properly zero-terminate the string. It would be more correct to start i at strlen(str), not strlen(str)-1, so that the '\0' is also moved.

I feel you are confused about the difference between a string and a char array.
A char array is the underlying data structure within which a string is held.
A string is a sequence of non-zero bytes followed by a zero byte, indicating the end of the "active" data in the string.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
 
void prependDigit(char *str, size_t size, int x) {
    size_t len = strlen(str);
    if (len + 2 > size) {
        fprintf(stderr, "prependDigit: string overflow\n");
        exit(EXIT_FAILURE);
    }
    for (size_t i = len; i-- > 0; ) str[i + 1] = str[i];
    str[0] = x % 10 + '0';
}
 
int main() {
    char num[32] = "12345"; // if size was only 6 it would overflow
    prependDigit(num, sizeof num, 0);
    printf("%s\n", num);
    return 0;
}
Note that since size_t is unsigned you cannot say:
Code:
    for (size_t i = len; i >= 0; --i)
i will always be >= 0 and will simply wrap-around to its highest value if it is decremented when it is 0.