Maybe not, but people absolutely do it all the time. Convictions for perjury are rare, probably because it's way too much work to prove to a jury beyond a reasonable doubt that the witness absolutely knew they were lying when they made a statement that isn't corroborated by other evidence or witnesses.
If you won't follow our rules, I'll make another rule that says you have to!