This uses \AddToHook
to implement the page number.
\documentclass[10pt]{book}
\usepackage{lipsum}
\usepackage{marginnote}
\renewcommand*{\marginfont}{\scriptsize \sffamily}
\renewcommand\raggedrightmarginnote{}
\renewcommand\raggedleftmarginnote{}
\usepackage[
paperwidth=160mm, paperheight=240mm,
textheight=18cm,
textwidth=8cm,
inner=2cm, marginparwidth=2.5cm, marginparsep=0.5cm, showframe]
{geometry}
\pagestyle{empty}
\AddToHook{shipout/background}{\ifodd\value{page}
\put (\dimexpr 1in+\oddsidemargin+\textwidth+\marginparsep+\marginparwidth\relax, \dimexpr -1in-\topmargin-\headheight\relax)
{\llap{\thepage}}% right justified
\else
\put (\dimexpr 1in+\evensidemargin-\marginparsep-\marginparwidth\relax, \dimexpr -1in-\topmargin-\headheight\relax)
{\thepage}
\fi}
\usepackage{wrapfig}
\usepackage{fontspec}
\begin{document}
\newpage
\paragraph{First}
\begin{wrapfigure}{i}{0.64\textwidth}%
\vspace{5pt}
\noindent {\fontsize{46pt}{46pt}\selectfont \hspace{-5pt} Big}
\end{wrapfigure}
This\marginnote{I want this to be aligned. \lipsum[1]} is a paragraph. \lipsum[1]
\newpage
\paragraph{First}
\begin{wrapfigure}{i}{0.64\textwidth}%
\vspace{5pt}
\noindent {\fontsize{46pt}{46pt}\selectfont \hspace{-5pt} Big}
\end{wrapfigure}
This\marginnote{I want this to be aligned. \lipsum[1]} is a paragraph. \lipsum[1]
\newgeometry{marginparsep=0pt, marginparwidth=0pt, textwidth=11cm}
\lipsum[1]
\restoregeometry
\end{document}
This modifies \pagestyle{headings}
, which should be the default style for book class.
\documentclass[10pt]{book}
\usepackage{lipsum}
\usepackage{marginnote}
\renewcommand*{\marginfont}{\scriptsize \sffamily}
\renewcommand\raggedrightmarginnote{}
\renewcommand\raggedleftmarginnote{}
\usepackage[
paperwidth=160mm, paperheight=240mm,
textheight=18cm,
textwidth=8cm,
inner=2cm, marginparwidth=2.5cm, marginparsep=0.5cm, showframe]
{geometry}
\makeatletter
\def\ps@headings{%
\let\@oddfoot\@empty\let\@evenfoot\@empty
\def\@evenhead{\hskip\dimexpr -\marginparsep-\marginparwidth\relax \thepage\hfil\slshape\leftmark}%
\def\@oddhead{{\slshape\rightmark}\hfil\thepage\hskip\dimexpr -\marginparsep-\marginparwidth\relax}%
\let\@mkboth\markboth
\def\chaptermark##1{%
\markboth {\MakeUppercase{%
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\@chapapp\ \thechapter. \ %
\fi
\fi
##1}}{}}%
\def\sectionmark##1{%
\markright {\MakeUppercase{%
\ifnum \c@secnumdepth >\z@
\thesection. \ %
\fi
##1}}}}
\makeatother
\pagestyle{headings}
\usepackage{wrapfig}
\usepackage{fontspec}
\begin{document}
\newpage
\paragraph{First}
\begin{wrapfigure}{i}{0.64\textwidth}%
\vspace{5pt}
\noindent {\fontsize{46pt}{46pt}\selectfont \hspace{-5pt} Big}
\end{wrapfigure}
This\marginnote{I want this to be aligned. \lipsum[1]} is a paragraph. \lipsum[1]
\newpage
\paragraph{First}
\begin{wrapfigure}{i}{0.64\textwidth}%
\vspace{5pt}
\noindent {\fontsize{46pt}{46pt}\selectfont \hspace{-5pt} Big}
\end{wrapfigure}
This\marginnote{I want this to be aligned. \lipsum[1]} is a paragraph. \lipsum[1]
\newgeometry{marginparsep=0pt, marginparwidth=0pt,textwidth=11cm}
\lipsum[1]
\restoregeometry
\end{document}