One possibility is to have two definitions: one for numbered chapters and the other one, for unnumbered chapters, using the numberless
key. In the definition for unnumbered chapters, some \phantom
s are used to hide the chapter name and the chapter number; for the bonus question, a \rlap
will do the job:
\documentclass{book}
\usepackage[a5paper]{geometry}% just for the example
\usepackage{titlesec}
\newcommand*{\justifyheading}{\raggedleft}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\justifyheading}
{\filleft\Large\textsc{\chaptertitlename}\rlap{~\Huge\thechapter}}
{1ex}
{\titlerule\filleft}
\titleformat{name=\chapter,numberless}[display]
{\normalfont\huge\bfseries\justifyheading}
{\filleft\Large\textsc{\phantom{\chaptertitlename}}\rlap{~\Huge\phantom{\thechapter}}}
{1ex}
{\titlerule\filleft}
\begin{document}
\chapter{Test Numbered Chapter}
\chapter*{Test Unnumbered Chapter}
\end{document}

With your current settings, you need to use a font allowing you bold-faced small caps, although I would suggest you to have only small caps (not boldfaced).
As barbara beeton has suggested, your current settings will result in the title being too close to the rule; adding some spacing would produce a better result:
\documentclass{book}
\usepackage[a5paper]{geometry}% just for the example
\usepackage{titlesec}
\newcommand*{\justifyheading}{\raggedleft}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\justifyheading}
{\filleft\Large\textsc{\chaptertitlename}\rlap{~\Huge\thechapter}}
{1ex}
{\titlerule\vskip1ex\filleft}
\titleformat{name=\chapter,numberless}[display]
{\normalfont\huge\bfseries\justifyheading}
{\filleft\Large\textsc{\phantom{\chaptertitlename}}\rlap{~\Huge\phantom{\thechapter}}}
{1ex}
{\titlerule\vskip1ex\filleft}
\begin{document}
\chapter{Test Numbered Chapter}
\chapter*{Test Unnumbered Chapter}
\end{document}

\documentclass{...}
and ending with\end{document}
. – Marco Daniel May 11 '13 at 17:46