Here the answer is 'sometimes'. There are
several tricks to find the age of a rock --
but there are several caveats well: Rocks don't
all have the same ways of coming into existence,
some are formed via sediment, some directly from
volcanism and some from repeated sedimentation,
crystal growth, pressure and temperature changes,
etc.

For a rock formed from sediment, age can
often be judged by the collection of fossils and
micro-fossils in the rock. Additional
information can be judged by the radioactive
decay of elements which are common in some
rocks and whose by-products can't escape the
stone. For example, Models of the atmosphere and
of natural isotope sources can be used to estimate
the ratio of Carbon-14 versus Carbon-12 in
recent (ice age Eocene) fossils. Since the decay
rate is known for Carbon-14 (about 26,000 years
half-life), by measuring a carefully selected
(unexposed to the elements) portion of the fossil
and determining the isotopic abundance of Carbon,
one can tell how long the fossil has been
protected from interchange of Carbon with the
environment. Over longer spans of time, other
radioactive species suffice such as
potassium->argon, Uranium/Thorium etc.

The success of these techniques depends on the
degree to which subsequent environmental effects
can be ruled out. For example, some early results
in seismology were invalidated where the effects
of high than expected ground water solubilities
were found. However, in dry climates, and in hard
rock, the precision can be quite good. I think the
dating of the anomalous Iridium layer
world-wide has been measured to 65+- 1/2 million
years by several people using independent
techniques. (This layer is thought to have been
caused by impact of an small asteroid -- which
coincided with the end of the dinosaurs.)

There are other techniques, based on
chemical reactions which are very slow or
which can happen only in special cases, but these
are not as dependable as radio-isotope dating
simply because they are more sensitive to the
environment. Finally, rocks on the surface i.e.
rocks on the moon can be dated by weathering from
the solar wind and cosmic ray flux, both of
which are well studied and thought to be
relatively constant for the last few billion
years. This technique was used in some lunar
samples brought back by astronauts.