By using Plots’ insets, it is possible:

Plots code
using Plots
function f(x, y)
r = sqrt(x^2 + y^2)
return cos(r) / (1 + r)
end
x = range(0, 2π, length = 30)
theme(:dark)
heatmap(x, x, f, c=:thermal, colorbar=false, inset=(1, bbox(0.85, 0.1, 0.1, 0.8)));
heatmap!(x, x, f, c=:thermal, fg_color=:white, subplot=2)