As far as I understood, the following does what you want (thanks to David Carlisle's comment for the hint about perpage!):
\RequirePackage{filecontents}
\begin{filecontents}{mypackage.sty}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mypackage}
\RequirePackage{perpage}
\newcounter{mycounter}
\MakePerPage{mycounter}
\newenvironment{myenv}{%
% \mycommand is only defined inside the environment
\let\mycommand\my@command
% Make sure the next \mycommand isn't ignored, even if its argument
% matches the value stored in \mypackage@storedval.
\setcounter{mycounter}{0}%
\ignorespaces
}{%
\par\ignorespacesafterend
}
\DeclareOption{skiprepetitions}{%
\AtBeginDocument{\let\mypackage@print\mypackage@print@skip}%
}
\DeclareOption{keeprepetitions}{%
\AtBeginDocument{\let\mypackage@print\mypackage@print@keep}%
}
\ExecuteOptions{keeprepetitions}
\ProcessOptions\relax
\RequirePackage{xifthen}
\def\mypackage@storedval{} % create a macro to later store a value in
\newcommand{\my@command}[1]{%
\ifthenelse{\isempty{#1}}%
{% if empty just print an empty line
\mbox{}%
}%
{% If this is the first \stepcounter{mycounter} executed since the current
% page was started, this sets 'mycounter' to 1.
\stepcounter{mycounter}%
\mypackage@print{#1}%
\def\mypackage@storedval{#1}%
}%
}
\def\mypackage@print@skip#1{%
\ifthenelse{\cnttest{\value{mycounter}}>{1}\AND
\equal{#1}{\mypackage@storedval}}%
{\mbox{}}%
{#1}%
}
\def\mypackage@print@keep#1{#1\\}
\end{filecontents}
\documentclass{article}
\usepackage[skiprepetitions]{mypackage}
\begin{document}
\setlength{\parindent}{0pt}
\begin{myenv}
\mycommand{A}\\ %A
\mycommand{A}\\ %empty
\mycommand{A}\\ %empty
\mycommand{}\\ %empty
\mycommand{B}\\ %B
\mycommand{C}\\ %C
\mycommand{C}\\ %empty
\mycommand{A}\\ %A
\end{myenv}
\begin{myenv}
\mycommand{A}\\ %A
\mycommand{A}\\ %empty
\newpage
\mycommand{A}\\ %A
\end{myenv}
\end{document}
I used a new counter called mycounter that is subject to \MakePerPage{mycounter}. This implies that the first \stepcounter{mycounter} on any given page resets mycounter to 1,a because 1 is the default value of the optional argument of \MakePerPage.
I made it so that at the beginning of myenv, mycounter is set to 0. Besides, \stepcounter{mycounter} is executed whenever \mycommand is called with a non-empty argument. Therefore, after this \stepcounter{mycounter} is performed, mycounter is equal to 1 if and only if:
this is the first \mycommand call on the current page, or;
this is the first \mycommand call in the current myenv environment.
This is the basis for the “ignoring criterion” you need. The only other thing to check is that, when we are in “possibly-ignoring mode”,b the argument passed to \mycommand differs from the saved value (since all this comes after the emptyness check).
Note that I renamed your \mycommand to \my@command and do \let\mycommand\my@command only inside the myenv environment, so that if you have a call to \mycommand that lies out of any myenv environment, LaTeX will report an error (undefined command).
You may want to move the \stepcounter{mycounter} call at the beginning of the \my@command macro: this depends on the behavior you want when an empty argument is passed. Should it make the new state be “possibly-ignoring mode”, or should it let the state unchanged (in my code: the latter)? This is a decision that belongs to you. But since you just output an \mbox{} for empty arguments, the difference won't be very visible in general...

Footnotes
a. After two compilation runs, since the perpage package relies on the .aux file.
b. I.e., the argument is non-empty and the \mycommand call is neither the first-on-page nor the first-in-environment.
perpagepackage. – David Carlisle Apr 07 '19 at 10:50perpageseems to reset counters, but how do I get it to reset the value that I'm storing in that macro? In general even at environment boundaries I don't know how to reset it. – jan Apr 07 '19 at 12:16