sure you can include it in modular. Assuming your base has has a structure like this:
{% block javascripts %}
{% do assets.add('jquery',102) %}
{% do assets.addJs('theme://js/modernizr.custom.05229.js',101) %}
{% do assets.addJs('theme://js/theme.js') %}
{% endblock %}
{{ assets.js() }}
You can override the javascript block, then call parent() to include the base stuff already defined, then add your own. Like this:
{% block javascripts %}
{{ parent() }}
{% do assets.add('theme://js/modular-only.js') %}
{% endblock %}
Of course, your modular twig page must be extending the base that has the javascript block defined.