Sure, anything is possible:
It has limitations -- you can't have (unescaped) single quote characters or null bytes in the string. It's more a fun toy than a real method.
char *str = "your string data";
char *buff = malloc(strlen(str) +8);
sprintf(buff, "echo '%s'", str);
str_fp = popen(buff, "r");
while((c = fgetc(str_fp)) != EOF)
Personally, I'd rewrite your code to abstract out the I/O. Then you could just drop in different methods.