Bring the stock or water to a simmer in a large saucepan; add the rice and salt, reduce heat to low and cook, covered, until the rice is tender, about 45 minutes. Remove from the heat and fluff with a fork. Add the dried cranberries as you do.
Heat the butter or oil in a large skillet and sauté the shallots and celery until softened, about 5 minutes. Add the apple and cook for a few more minutes, until they begin to soften. Stir in the sage, thyme, pepper and cook for a few more minutes. Transfer to a bowl and toss with rice and pecans.
Use the mixture to stuff a turkey, or put it in a buttered baking dish that will accommodate it, cover and bake (alongside your turkey, if you like) at 350°F for about half an hour. Serves 6-8.