From a practical realistic point of view, yes the AFMU should definitely be a self contained, self reliant device that can operate fully independently of the ship. IRL it would be designed that way. But for game purposes I think they don't do this. (Of course IRL such a device would just not be capable of fixing certain types of damage to components, which also seams reasonable, short of swapping out major components requiring you to travel with a cargo bin full of spare parts too sophisticated for the AFMU to simply repair or synthesis).
I think the OP has a fantastic idea because it enables more types of gameplay in the future. Players could engage in more potentially dangerous activities far away from stations and as long as they survive they can repair. This could be used to introduce many more forms of gameplay into ED. And as the OP has said, repairing might not be easy. Not just a click of a button. Gathering and synthesizing materials might be required. Balancing repair time with life support, etc. Perhaps these are procedures for more advanced players.
Edit: Traveling with a cargo bin of "standard spare parts for ship XXX" would also be an interesting trade-off when equipping your ship. Small, Medium, or Large cargo bin depending on size of ship. Do you take the extra cargo bin and weight? Or risk being stranded? Probably too late to introduce this concept, the magical AFMU has already been provided as-is.