Can a person say something untrue to God? I do not see why not.
+++++++++++++++++++++++++++++++
First, there is the problem that God might well not be in existence. He might have died or left the building. Ypu know, like Elvis.
Second, there is the problem that God actually listens or understands something said to him. There is the possibility that the Big Bang was so really big a bang that he is deaf.
Third, if we suppose that Ananias was devout enough to sell some of his stuff (I think the word 'profit' is incorrectly used for at least some of the sale of his assets), then he should be sufficiently clever to also believe that lying to an omniscient, omnipotent being is essentially futile. Such a being , like Sanata Claus, "knows when you are sleeping, knows when you're awake, knows when you've been bad or good, so be good, for goodness' sake" I find it somewhat strange that God himself did not point this out to him, rather than relying on some mortal to do so.
Ananais seems to be a rather negative figure in the Scripture: no one names their kid "Ananais", do they?
I would think that if he had been forgiven, this would have been mentioned.