Inside a macro the callers environment is available in __CALLER__. The imported modules are actually available in the environment as Michal said and OvermindDL1 showed:
iex(1)> __ENV__.macros
[{IEx.Helpers,
[b: 1, h: 1, import_file: 1, import_file: 2, import_file_if_available: 1,
import_if_available: 1, import_if_available: 2, s: 1, t: 1]},
{Kernel,
[!: 1, &&: 2, ..: 2, <>: 2, @: 1, alias!: 1, and: 2, binding: 0, binding: 1,
def: 1, def: 2, defdelegate: 2, defexception: 1, defimpl: 2, defimpl: 3,
defmacro: 1, defmacro: 2, defmacrop: 1, defmacrop: 2, defmodule: 2,
defoverridable: 1, defp: 1, defp: 2, defprotocol: 2, defstruct: 1,
destructure: 2, get_and_update_in: 2, if: 2, in: 2, is_nil: 1, match?: 2,
or: 2, pop_in: 1, put_in: 2, raise: 1, raise: 2, reraise: 2, reraise: 3,
sigil_C: 2, sigil_D: 2, sigil_N: 2, sigil_R: 2, sigil_S: 2, sigil_T: 2,
sigil_W: 2, sigil_c: 2, sigil_r: 2, sigil_s: 2, ...]}]
In the code snippet above you can see the modules IEx.Helpers and Kernel. They are imported modules.
See the import: Kernel in the snippet above.