If you plan ahead, the answer is yes you can buy modules and have them delivered to the station you are docked in.
Players do this all the time. You can buy whatever modules you want and put them in storage for use later on*. Particularly handy for engineering items at remote locations. Shield boosters, wake scanners, multicannons, lasers, are all examples of things you engineer extras of and leave in storage for later. Other misc things you buy and leave in storage for later delivery are cargo racks, passenger cabins, etc. When you need them you get them delivered. Forward planning.
*Unfortunately you are limited to the module slots available to your current ship. For the types of modules you would typically swap out for various purposes this isn't an issue. And as you accumulate different sized ships you also accumulate stuff in storage.
I use this routine all the time for various reasons, usually when I can’t get my FC into the system I’m working in.
I’ve got multiple sets of the same weapons engineered in different ways for different scenarios.
I’ve even got multiples of the same ships set up in different ways.
Some times I want my Bounty Hunting ship, sometimes I want my CZ ship.
Sometimes I want my Pack Hounds instead of my Seekers.
If it’ll take longer to go back to my FC than it will to have them transferred then I’ll transfer them and go put the kettle on while I wait.
Plus they’ll be then at the station I’m taking missions from for easy acces if I change my mind again.
As the old adage goes...
“If you fail to plan, you are planning to fail.”