This is really going to depend on the music. For example, if you are playing a first-inversion major chord (for example, you have a G♯ in an E-major chord) then your pitch should be lower than it would otherwise be (assuming that the E and B played by the other strings are in tune with the piano). However, nobody will notice this much unless the chord is sustained (and even then it will only be very noticeable if it is played with little or no vibrato).
If the strings are playing a sustained passage while the piano is flying around in sixteenth notes, then you don't need to worry nearly as much about matching the E on the piano; instead, you should pay attention to the sonority of the string chord. By contrast, if the piano has a sustained note, you may want to match it. If the cello part doubles the bass part in the piano, you will almost certainly want to match the piano. If the cello part takes on more of a tenor role or especially a solo role, then you may want to inflect your tuning a bit more, if the piano part is written to allow it.
The real thing to keep in mind, of course, is that you should do what makes the music sound best. That will vary from one piece to the next, but you should be alert for passages where it sounds better when you tune to your other colleagues rather than to the piano, and that is, I suspect, what your teacher was trying to get at.
As an example, picked out of thin air (or, more precisely, the first result from a search for
mozart piano trio sheet music), consider this trio in E major, K 542:
Much of the cello part here is in unison or octaves with the piano, and will have to be tuned to the piano. The C♯ at the third beat of measure 20, however, is not doubled, so you could tune it acoustically to the E in the left hand of the piano part. An acoustic minor tenth has a frequency ratio of 12:5, which is roughly 16 cents wider than than an equal minor tenth. Since the upper note of this interval is played by the piano, you would lower the cello note to make the interval wider.
The A in measure 21 will need to be tuned to the A in the right hand, but the G♯ in measure 22 could be low, because this is the first-inversion chord mentioned in the first paragraph. An acoustically pure major third is roughly 14 cents narrower than an equal-tempered major third. If the violin's B and E are a perfect fifth apart, the violin's B will be two cents higher than the piano's B (this accounts for the difference between the minor third's 16-cent adjustment and the major third's 14-cent adjustment). The frequency ratios for the B and E are 48:5 (6:5 plus three octaves) and 32:5 (8:5 plus two octaves). (Although the notes do not sound simultaneously, there will probably be some G♯ still reverberating when the violinist plays the E.)
In practice, you might find these lowered notes sound flat and dull because, well, they are indeed flat compared to other C♯s and G♯s that you'll hear from the piano. The solution in that case may be to reduce the adjustment rather than to eliminate it altogether. That is, you may find it helpful to compromise between melodic considerations and acoustically "pure" harmonic intervals. Lowering the notes very slightly from the equal-tempered pitch might be an improvement even if going all the way to the acoustically pure pitch isn't.