Having a modules/
subtree in a module is no valid structure as far as the autoloader is concerned. There is no semantics for submodules.
If you desperately want this particular case to work, you will have to add /etc/puppet/modules/A
to your modulepath
config setting.
You may wish to ask a new question and describe what you are actually trying to solve, because it seems that your code architecture is a little unclean.