Stupid question because I am very new to embedded programming and C (I started my journey this weekend), but could one use freertos's tasks library in a regular x86 desktop application to accomplish something similar?
Not stupid at all. Like many early questions in programming, it's actually a fairly deep.
Because FreeRTOS is unlikely to play nice with your host OS, typically you'd need to emulate a target (say, arm) using an emulator like qemu. Once you're at that point, you could run it like any other program. There's probably more complexity to it like building an image but there'd be a bunch of tutorials for this.
When would you typically do this? For testing your FreeRTOS (or other bare metal) code without actually loading it on to your device and power cycling it. Maybe as part of a regression test